scrollbar-color

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.

It is documented as part of the CSS Scrollbars Styling specification.

/* Usage Example */
.custom-scroll {
  scrollbar-color: #888 #eee;
  /* sets the scrollbar thumb to gray and the track to light gray */
}

/* Syntax */
scrollbar-color: auto;

/* Global values */
scrollbar-color: inherit;
scrollbar-color: initial;
scrollbar-color: revert;
scrollbar-color: revert-layer;
scrollbar-color: unset;

This comparison shows how scrollbar-color works in a real project. View snippet →

Newly available Since 2025 76% global usage

Since 2025 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

121+
64+
26.2+
121+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC