From daa8e6a0c84fe28439090b92631c79244bfd3e94 Mon Sep 17 00:00:00 2001 From: Iisakki Rotko Date: Wed, 21 Feb 2024 09:09:59 +0100 Subject: [PATCH] fix: jupyter colors not updating on theme change --- solara/server/templates/solara.html.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/solara/server/templates/solara.html.j2 b/solara/server/templates/solara.html.j2 index c858800a9..f8c6b8f9b 100644 --- a/solara/server/templates/solara.html.j2 +++ b/solara/server/templates/solara.html.j2 @@ -252,6 +252,11 @@ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => { this.$vuetify.theme.dark = inDarkMode(); }); + if (this.$vuetify.theme.dark) { + this.changeThemeCSS('dark'); + } else { + this.changeThemeCSS('light'); + } }, methods: { stateReset() {