gotchas.dev

TIL about scrollbar-gutter

TIL about scrollbar-gutter, a useful CSS property that forces a scrollbar gutter in lieu of the scrollbar itself when it normally wouldn't render (i.e. < 100vh). This results seamless navigation between short and long pages, without any visual content shift. Because of this, the only caveat is that the <body> will not fully extend to the edges of the page so it should only be used on sites that do not rely on viewport-width elements.

#css #til