A couple CSS tricks for HTML Dialog elements
23 points by surprisetalk a day ago | 2 comments
  • vintagedave 9 hours ago |
    The trick to prevent scrolling by setting overflow: hidden unfortunately results in visual page jumping for me.

    The reason is I have macOS set up to always show scroll bars, instead of hiding them. At least one browser (I forget which, but I test on Safari, Firefox and Chrome) doesn’t have a disabled scroll bar but removes it altogether. This makes the page wider and causes it to reflow and move.

    Does anyone know how to keep the scroll bar onscreen, just not enabled?

    • KTibow 8 hours ago |
      Website authors can set a scrollbar gutter.