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: Opening a modal with scrollbar-gutter: stable shifts the page content and shows white (non grey-overlayed) gutters #40789

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

ac-mmi
Copy link

@ac-mmi ac-mmi commented Sep 3, 2024

This pull request addresses #40659 issue.

I have updated the modal SCSS file to include a fix that targets the content shift issue when the scrollbar-gutter: stable both-edges property is used. Specifically:

  • I added a @supports rule that checks if the browser supports scrollbar-gutter: stable both-edges.
  • When the modal is open (.modal-open class is applied to the body), the additional padding-right adjustment is removed, preventing the content from shifting unexpectedly.

This fix ensures that the modal behavior remains consistent and that no unnecessary padding is applied when scrollbar-gutter: stable both-edges is present.

Closes #40659

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants