5 ms·
Thank you for bringing this up. I had been looking for an “easy” way to enable a Dark Mode on my website without overriding user-configured default colors and t
by Linux-Fan 3y ago
Thank you for bringing this up. I had been looking for an “easy” way to enable a Dark Mode on my website without overriding user-configured default colors and this seems to do it pretty well.
My page uses a minimalistic CSS and only changes the colors for syntax highlighting -- which is now slightly broken in the dark mode but probably still an improvement over the white background for those people who want the dark mode :)
- 50 3y ago> only changes the colors for syntax highlighting -- which is now slightly broken in the dark mode might be of use: @supports (color-scheme: dark light) { @media screen and (prefers-color-scheme: dark) { code { ... } } }
- Linux-Fan 3y agoMy current solution is to switch the syntax highlighting to monochrome which should work fine for both modes. I love the colorful syntax highlighting, though. So maybe I will revisit this later to find out if I can do something along the lines of what you suggest.