Add dark mode support to less theme used by this blog!
Some details
I use the prefers-color-scheme CSS media query. Also, I put all color used in this site inside two sass map.
Now I understand why human invents css-in-js...
How to use it?
In the latest version of Windows, macOS, Android 10 and iOS, just set the color scheme to Dark Mode in system setting, and Chrome will use the dark mode automatically.
Under Linux, things are not there yet. There has not been an universal API yet. Now what I do is add this into ~/.config/chromium-flags.conf
|
|
And then Chromium will use dark mode for all website that supports it.