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

[FeatureRequest]: Automatic light/dark mode switching based on OS preferences #31751

Open
grmat opened this issue Mar 6, 2021 · 2 comments
Open

Comments

@grmat
Copy link

grmat commented Mar 6, 2021

What would you like to be added:
Respect the user's setting for prefers-color-scheme to automatically choose between light and dark modes.

Why is this needed:
All major desktops support some kind of automated day/night switch by now, which will usually also toggle the prefers-color-scheme preference in web browsers. Respecting this preference by default while keeping the Grafana preferences to be able to override it would result in better UX, IMHO.

The way I could imagine this is by

  1. utilising the Default option in Grafana's preferences page (Default | Dark | Light). On loading, check for prefers-color-scheme
    1. if not present, fall back to current Default behaviour
    2. dark: load dark.css
    3. light: load light.css
  2. adding another option (Default | Dark | Light | OS)
@ying-jeanne ying-jeanne added this to Needs triage in Platform Backlog via automation Mar 8, 2021
@hugohaggmark hugohaggmark removed this from Needs triage in Platform Backlog Mar 10, 2021
@hugohaggmark hugohaggmark changed the title Incorporate css media query prefers-color-scheme for automatic light/dark mode switching [FeatureRequest]: Automatic light/dark mode switching based on OS preferences Mar 10, 2021
Copy link
Contributor

This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!

@github-actions github-actions bot added the stale Issue with no recent activity label Jan 22, 2024
@peterhoeg
Copy link

peterhoeg commented Jan 23, 2024

Apologies, I thought adding a comment would be enough to have the stale tag removed.

@github-actions github-actions bot removed the stale Issue with no recent activity label Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants