scrollbar-gutter
Newly availableSince 202495% of users
Configures the scrollbar-gutter property on an element.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since December 2024. Widely available around June 2027.
The old way and the modern waySee the snippet: Preventing layout shift from scrollbar appearance →
Old way 9 lines
/* Option 1: always show scrollbar (ugly on short pages) */
body {
overflow-y: scroll;
}
/* Option 2: hardcode scrollbar width (fragile) */
body {
padding-right: 17px;
}
/* scrollbar width varies by OS and browser */Modern 3 lines
html {
scrollbar-gutter: stable;
}See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
auto- Inherited
- No
- Applies to
- scrolling boxes
- Animation type
- discrete
Values
autostableboth-edgesRelated snippet
Preventing layout shift from scrollbar appearanceLayout →scrollbar-gutter browser support
BaselineNewly availableSince 2024 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.Works in all modern browsers. May need a fallback for older browsers.
Usage95%of people can use this5% use a browser without it.
Browsers
94+
97+
18.2+
94+Mobile
94+Android
97+Android
18.2+iOS