← Back to release summary

CSS Scrollbars: scrollbar-color, scrollbar-width

Category
CSS
Type
New or changed feature
Status
Enabled by default (Chrome 121)
Intent stage
Start prototyping

Summary

The CSS Scrollbars spec allows authors to style scrollbars by specifying their colors and thickness. This spec adds the following two properties. The scrollbar-color property provides the capability of changing the color scheme of scrollbars so they fit better into the particular style of a web page. The scrollbar-width property allows the use of narrower scrollbars that may be more suitable for some use cases, or even to hide the scrollbars completely without affecting scrollability.

Motivation

There are three main use cases that CSS Scrollbars spec intends to resolve: · Coloring scrollbars to fit better into the UI of a web application. · Using a thinner scrollbar when the scrolling area is small. · Building custom scrollbars without affecting scrollability. See here for more detail: https://www.w3.org/wiki/Css-scrollbars#Use-cases For addressing these use-cases, this spec adds properties to control the colors and width of scrollbars of an element (including the possibility of hiding scrollbars completely).

Standards & signals

Samples: https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-width

Explainers: https://github.com/felipeerias/css-scrollbars-explainer

View on chromestatus.com