2

I want to get my scrollbar dark mode as well (exactly like Github does for example). Referring to this answer, using the css color-scheme works but as stated, it messes up the inputs and form-controls.

Is there a way to use this class but not let it override input and form-control? Or perhaps there are better ways to have dark scrollbars without defining a custom scrollbar from scratch.

1 Answers1

0

You could create a div which contains the scrollbar only and apply color-scheme: dark; style, or you could use body::webkit-scrollbar styling to create a custom scrollbar entirely, last I can think of is you could manually redefine the styling you do not want color-scheme to change.

  • Here's a doc on webkit-scrollbar: https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-scrollbar –  Sep 15 '22 at 08:13