Reputation: 41
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.
Upvotes: 4
Views: 4109
Reputation:
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.
Upvotes: 2