grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
64.49k stars 12.07k forks source link

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

Open grmat opened 3 years ago

grmat commented 3 years ago

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)
github-actions[bot] commented 9 months ago

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!

peterhoeg commented 9 months ago

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