Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Dark mode #188
This adds dark mode css to writefreely which gets enabled automatically when the OS is set to dark mode (
That is all. I tried to just invert the colors and not do any other stylistic choices.
in OS preferences. I will be using it myself and fix things until I find out that this is adequate to merge to develop.
This just queries the browser whether `prefers-color-scheme` is set and chooses dark mode if needed, and only if the user hasn't manually set a scheme by pushing the button.
confirmed working: firefox 69.0.1
it looks like there are issue with chromium/chrome on linux using gtk themes that are still being ironed out, so it will work eventually. see https://bugs.chromium.org/p/chromium/issues/detail?id=1004246
Thanks for taking the time to explore this, @qwazix! I like the idea in theory, but I'm still thinking about if this should be in the core platform. Just some thoughts below.
I do like the idea of the system setting the default mode of the pad -- I think that's a great use case for dark mode that we could incorporate today. But I'm very hesitant to change the entire site (especially the reading experience) to respect the mode. A few reasons:
Considering all of this (and barring any other input), I think we should keep the part where the system setting determines the initial Pad theme, and then separately publish your CSS in our external resources. That way, instance admins and blog users can include it if they want their WF instance or blog to support dark mode.