Grafana does not respect the Light/Dark Mode Switch #8

Closed
opened 2025-11-27 13:52:22 +01:00 by BS86 · 1 comment

When changing the Light/Dark Mode, the Grafana Iframe does not change to Light Mode, it will always display in dark mode.

Grafana has a Dark / Light Mode switch that should be accessible with a parameter &theme=light or &theme=dark

The iframe needs to be reloaded when switching the theme though.

ChatGPT thinks that changing the iframe to this will make it switch themes with JS:

<iframe   id="grafana-stats" height="420px" allowtransparency="true" class="stats-iframe" loading="lazy" title="Buildserver statistics dashboard" data-base-src="https://stats.itsh.dev/public-dashboards/0fb04abb0c5e4b7390cf26a98e6dead1">
</iframe>
When changing the Light/Dark Mode, the Grafana Iframe does not change to Light Mode, it will always display in dark mode. Grafana has a Dark / Light Mode switch that should be accessible with a parameter &theme=light or &theme=dark The iframe needs to be reloaded when switching the theme though. ChatGPT thinks that changing the iframe to this will make it switch themes with JS: ``` <iframe id="grafana-stats" height="420px" allowtransparency="true" class="stats-iframe" loading="lazy" title="Buildserver statistics dashboard" data-base-src="https://stats.itsh.dev/public-dashboards/0fb04abb0c5e4b7390cf26a98e6dead1"> </iframe> ```
Collaborator

Thanks for the info, I will have a look at it.

Thanks for the info, I will have a look at it.
vikingowl self-assigned this 2025-12-01 19:41:58 +01:00
vikingowl added the bugenhancement labels 2025-12-01 19:42:16 +01:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ALHP/alhp-web#8