code-hike / codehike

Build rich content websites with Markdown and React
https://codehike.org
MIT License
4.68k stars 142 forks source link

[code] Style scrollbars using the theme colors #110

Closed pomber closed 2 years ago

pomber commented 2 years ago

Maybe we can use something like this postcss plugin: https://github.com/pascalduez/postcss-scrollbar, and set some CSS custom properties using the theme colors.

pomber commented 2 years ago

Docusaurus uses thin scrollbars image maybe we can add that too

pomber commented 2 years ago

After some tests, using the theme colors can be done, but it overrides the MacOS behavior of auto-hiding the scrollbars, so it would be a worse experience for people that prefer that behavior.

What we should do is at least set the color-scheme property that matches the theme.

BTW, Firefox supports the standardized scrollbar CSS properties, and those properties don't override the MacOS behavior.