scrollbar-color
Newly availableSince 202588% of users
A modern, standard way to change the colors of a scrollbar's 'thumb' (the moving part) and 'track' (the background). It's much simpler than the old webkit pseudo-elements.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since December 2025. Widely available around June 2028.
The old way and the modern waySee the snippet: Scrollbar styling without -webkit- pseudo-elements →
Old way 13 lines
/* Chrome + Safari only — Firefox ignores all of this */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #888;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}Modern 4 lines
* {
scrollbar-width: thin;
scrollbar-color: #888 transparent;
}See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
auto- Inherited
- Yes
- Applies to
- scrolling boxes
- Animation type
- byComputedValueType
Quick example
.custom-scroll {
scrollbar-color: #888 #eee;
/* sets the scrollbar thumb to gray and the track to light gray */
}Values
autoRelated snippet
Scrollbar styling without -webkit- pseudo-elementsLayout →scrollbar-color browser support
BaselineNewly availableSince 2025 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.
Usage88%of people can use this12% use a browser without it.
Browsers
121+
64+
26.2+
121+Mobile
121+Android
64+Android
26.2+iOS