Skip to content
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

Switch to dark mode automatically via prefers-color-scheme #236

Open
rugk opened this issue May 14, 2019 · 1 comment · May be fixed by #237
Open

Switch to dark mode automatically via prefers-color-scheme #236

rugk opened this issue May 14, 2019 · 1 comment · May be fixed by #237

Comments

@rugk
Copy link
Contributor

rugk commented May 14, 2019

You already have a light and dark mode, but they are only to be switched manually.

There is a quite new CSS media query feature called prefers-color-scheme. It allows you to detect whether the system/user wants a dark website, so you can adjust your CSS.

Currently it is only supported by Safari and Firefox 67 or higher.

Anyway, it would be great, if you could make use of this. IMHO just set the default theme to the one the system wants, if the user did not set it manually…

BTW: I also have a Firefox add-on called “Dark Mode Website Switcher” (source code) that you can use to toggle this setting in Firefox directly – without needing to change the system option. Maybe that could be helpful.

@idank
Copy link
Owner

idank commented May 15, 2019

Pull request will be gladly accepted. :-)

rugk added a commit to rugk/explainshell that referenced this issue May 16, 2019
@rugk rugk linked a pull request May 16, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants