Scrollbar Color Property

Last updated: 2026-09-13

scrollbar-color Scrollbar Color Property

The scrollbar-color property customizes the color of the browser scrollbar, covering both the thumb and the track. It is part of the CSS Scrollbars specification and provides a simple way to match the scrollbar to the page's overall palette without JavaScript plugins.

Category
Initial Valueauto
InheritedYes
Applies To
Animation Type
CSS VersionCSS3
StatusStandard

📝 Syntax

scrollbar-color: auto | dark | light | <color> <color>;

⚙️ Values

ValueTypeDescription
auto | dark | lightKeywordA preset color scheme
<color> <color>ValueThe thumb and track colors

▶ Example

Edit the code below and see the live result in the playground:

🌐 Browser Support

Browser ChromeChrome EdgeEdge FirefoxFirefox SafariSafari OperaOpera
scrollbar-color v79 v12 v52 v10.1 v44
Supported in all major browsers
Tip: scrollbar-color is currently supported mainly in Chromium-based and Firefox browsers; Safari and older browsers need the ::-webkit-scrollbar pseudo-element.
Tip: The two color values correspond to the thumb and the track; if only one value is given, the browser computes the other automatically.

❓ FAQ

QWhat is the difference between scrollbar-color and ::-webkit-scrollbar?
Ascrollbar-color is a W3C standard property: two colors specify the thumb and the track — simple, but it can only change colors and thickness. ::-webkit-scrollbar is a WebKit/Chromium proprietary pseudo-element that can also customize width, rounding, and borders — far more capable but non-standard. Firefox uses the standard property; Chromium and Safari use the pseudo-element.
QWhat do the dark and light values of scrollbar-color do in CSS?
Adark tells the browser to render the scrollbar in a dark theme — a dark thumb with a light track. light is the opposite: a light thumb with a dark track. The exact colors are decided by the browser based on the platform and theme, and are commonly used to match dark mode. If you need exact colors, write two color values directly: the first is the thumb, the second the track.
QWhy does scrollbar-color not work in Chrome or Safari browsers?
AChrome officially supports scrollbar-color starting with version 121 (before that, Chromium only used ::-webkit-scrollbar), and Safari still does not recognize the standard property. There is no single cross-browser solution for a uniform scrollbar: the standard property covers Firefox and new Chrome, while the pseudo-element covers Safari and older Chrome.
QHow do I make scrollbar colors work across all browsers in CSS?
AUse a two-track approach: first set the thumb and track colors with the standard scrollbar-color for Firefox (and new Chrome), then style the WebKit scrollbar with ::-webkit-scrollbar and ::-webkit-scrollbar-thumb. If you need more, fall back to a JavaScript scrollbar library.

📚 Related Tutorials

Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏