Maciek Sitkowski
Maciek's Blog

Follow

Maciek's Blog

Follow

How to style scrollbars in dark mode?

Maciek Sitkowski's photo
Maciek Sitkowski
·Oct 21, 2022·

1 min read

I used the following CSS property to get dark mode styles for scrollbars in my project.

:root {
  color-scheme: dark;
}

But, as you can see on the screenshot below, it works for headings, form controls and other elements as well.

css-color-scheme.webp

Resources

 
Share this