-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented dark variant #105
Conversation
bc39119
to
4acef40
Compare
Looks fantastic! Will you please explain how you are approaching the default and how one toggles between light and dark mode? |
Generally, the system (Linux, MacOS, Windows, Android) has a dark/light preferences, that is passed to the browser. Depending on that preference, the browser will select properties to apply depending on prefers-color-scheme. There are ways to force a given mode in a browser with extensions like Dark reader. At the moment cinder theme can only be switched by triggering that option from the browser, or the system. What do you mean by approaching the default? |
I think that I misunderstood what you intended to support. So this automatically uses the user system setting for content theme. Is there a way to make this opt-in through our configuration in case existing users who upgrade want to keep the light mode color scheme for all users, irrespective of their system dark mode toggle setting? |
Yes.
Ok I'll have a look on how to do this. |
@chrissimpkins before I tackle this, there might be another option to consider: we could display a switch that would toggle between light, dark, or system mode. Something like this. What do you think? |
Sure, let's try it. I'm interested to see what you have in mind. Anyone out there who happens to be following this repo opposed? |
Hello! A switch as described there, defaulting to System Default, feels like the way to go for implementing on-page control. |
Sgtm! |
Hello, is this light/dark mode issue still valid? |
I think so, I just cannot find anytime to improve the PR, so this probably need someone to pick it up! |
From the looks of it, the feature got added in 60ae931 but this PR didn't get closed |
I took the color related CSS and made variables from them. The dark versions of those variables come from what DarkReader would have suggested.
The menu background image is disabled in dark mode.
I added the highlightjs github dark variant, so highlighted code also display well with dark theme.
The light theme should be unchanged.
I am not a designer so it is probably not perfect, but at least this is a start :)
Fixes #104.