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

Automatic "system" light/dark theme switching using prefers-color-scheme for Piwigo's admin interface #74

Open
nekohayo opened this issue Jan 30, 2024 · 0 comments

Comments

@nekohayo
Copy link

The manual light/dark switch can be nice to have, but in many cases nowadays, especially in the admin interface (vs the public-facing gallery that is always "just photo content"), I want the theme to automatically follow my browser's system theme. Indeed, my operating system / DE (GNOME with this extension) does the switch for me everyday at the correct times, and my web browser follows suit, telling webpages' CSS mediaqueries that dark is now "preferred" or not. This works on all OSes and modern browsers nowadays.

It would be nice for Modus to default to the system theme, at least for the admin interface (and maybe offer the configurability for the admin vs public interfaces, on whether you want to offer a choice to the public or if it should be always-dark or automatic).

You can detect this condition using this simple piece of CSS, such as:

@media (prefers-color-scheme: dark) { blah blah }

See https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme for more details.

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

No branches or pull requests

1 participant