sandoche / Darkmode.js

🌓 Add a dark-mode / night-mode to your website in a few seconds
https://darkmodejs.learn.uno
MIT License
2.71k stars 175 forks source link

:root defined CSS-variable swap for light/dark-mode? #90

Open exetico opened 2 years ago

exetico commented 2 years ago

Hi

Thank you for a great script.

Have you considered adding a support for a CSS-variable swap logic, or at least, manipulate the existing ones? (And restore them, if light-mode is enabled again).

I've created a few pages where it's actually pretty easy to turn almost everything into dark-variables, but I'd like to have a solution like this on top. Allowing me the best of both worlds: Some cool tricks, and "CSS-variable" color swaps. The CSS-variable color swaps could be defined manually in the settings, or... Let the computer guess, and... allow us to at least tell the computer, if something goes wrong 🙈 ;-) ...