Open tobimori opened 4 years ago
The CSS rule for @media screen and (prefers-color-scheme: dark) { } would work, but it would enforce one color only, and for the users that have that browser / app setting ON already. No way to switch it ON, OFF quickly during sunny moments. Or give it to all as a click-able option.
To resolve that, I did the hard work.
Made and tested the code for a CSS color switch with memory. Great for the night and evening time.
See live demo on GitHub page:
https://dorson.github.io/CSS-Dark-Mode-and-color-switch/
Have fun, feel free to fork, copy, adopt, port, etc...
Make darkmode switchable without
prefers-color-scheme