Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(purchase cart): dont show scrollbar if not needed #83

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

mapra99
Copy link
Owner

@mapra99 mapra99 commented Jan 29, 2023

Closes #69

The overflow:scroll behavior added to the cart list wrapper was causing the scrollbars to be permanently visible. This looks specially bad on windows.
image

Changing the rule to overflow-y:auto fixes the issue, and makes the scrollbar appear only when the list is long enough, also this should be the behavior for y direction only

@mapra99 mapra99 requested a review from ImMPrada January 29, 2023 23:19
@@ -7,7 +7,7 @@ const PurchaseCartModal = ({ cart, onClose, onCartRemoval }: PurchaseCartModalPr
<div className="z-50 fixed top-0 left-0 right-0 bottom-0">
<div className="relative h-full w-full p-6 sm:px-10">
<div className="absolute top-0 left-0 w-full h-full -z-10 bg-black opacity-40"/>
<div className="max-w-6xl mx-auto mt-20 max-h-full overflow-scroll pb-20 box-border">
<div className="max-w-6xl mx-auto mt-20 max-h-full overflow-y-auto pb-20 box-border">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cute

Copy link
Collaborator

@ImMPrada ImMPrada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:O

@mapra99 mapra99 merged commit 4c7d4b1 into main Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modal scrollbars are appearing on Chrome for Windows
2 participants