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: modal layout shift for none overlay scrollbar #1868

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

Conversation

Legend-Master
Copy link

The current way of preventing scrolling will hide the scrollbar and causing a layout shift when using a none overlay scrollbar (default on windows)

image
image

I can only think of two ways to handle this, but they all cause a pretty small layout shift on sticky elements (1px)

  • Make a padding to the right to fill up the missing scrollbar space
  • Set body position fixed and change the z index

But to be honest, I would prefer not to do it at all, able to scroll the things behind the searching UI is not a big problem comparison to a layout shift to me

@netlify
Copy link

netlify bot commented Apr 22, 2023

‼️ Deploy request for docsearch rejected.

Name Link
🔨 Latest commit 4b64ecc

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.

1 participant