scribd/scribd.github.io

Support dark-mode

rtyler opened this issue · 1 comments

@kylegordy and I had discussed this at one point, and I wanted to make sure we didn't forget it.

Since this is a tech blog, dark mode is very important 😸

You could port your existing color values into CSS variables and then make additional color classes with different values for those CSS color variables.

I coded a flexible and working solution for the Dark Mode.

Try demo in here:
https://dorson.github.io/CSS-Dark-Mode-and-color-switch/

Works with basic CSS variables + short JavaScript.

Can be used inside existing CSS style file. Can be used to define multiple color themes in one CSS file. No user logins or profiles or tracking required.

Let's save our eyesight at night :-)

Have fun using my code !