Skip to content

Instantly share code, notes, and snippets.

@francoisgeorgy
Created October 31, 2021 08:10
Show Gist options
  • Select an option

  • Save francoisgeorgy/fe085c6067d978535907f20c92435208 to your computer and use it in GitHub Desktop.

Select an option

Save francoisgeorgy/fe085c6067d978535907f20c92435208 to your computer and use it in GitHub Desktop.
CSS scrollbar #css
/*
- https://www.bram.us/2021/07/23/prevent-unwanted-layout-shifts-caused-by-scrollbars-with-the-scrollbar-gutter-css-property/
- https://codepen.io/bramus/pen/LYyzKrX
*/
.scrollbar-gutter-auto {
scrollbar-gutter: auto;
}
.scrollbar-gutter-stable {
scrollbar-gutter: stable;
}
.scrollbar-gutter-stable-both {
scrollbar-gutter: stable both-edges;
}
@supports(scrollbar-gutter: auto) {
.warning {
display: none;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment