docsearch icon indicating copy to clipboard operation
docsearch copied to clipboard

fix: modal layout shift for none overlay scrollbar

Open Legend-Master opened this issue 2 years ago • 1 comments

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

Legend-Master avatar Apr 22 '23 17:04 Legend-Master

Deploy request for docsearch rejected.

Name Link
Latest commit 4b64eccb3a2dd0ba61ccee822e1d465cb18f81f2

netlify[bot] avatar Apr 22 '23 17:04 netlify[bot]