From 8bd899d146ef361f6b658bc1f26ed486f56d9183 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Tue, 3 Mar 2026 11:56:51 -0800 Subject: [PATCH] fix: persist theme via html[data-theme] + theme.css custom properties - Blocking script restores canvas-theme from localStorage with prefers-color-scheme fallback (no FOUC) - New theme.css with CSS custom properties for dark/light - Removed data-theme from body/header/tab-row (now on ) - Theme toggle writes to documentElement instead of body Co-Authored-By: Claude Opus 4.6 --- server/shell.ts | 26 ++-- shared/components/rstack-identity.ts | 3 +- website/public/theme.css | 193 +++++++++++++++++++++++++++ 3 files changed, 207 insertions(+), 15 deletions(-) create mode 100644 website/public/theme.css diff --git a/server/shell.ts b/server/shell.ts index a44602c..f1b6939 100644 --- a/server/shell.ts +++ b/server/shell.ts @@ -470,7 +470,9 @@ export function renderExternalAppShell(opts: ExternalAppShellOptions): string { ${escapeHtml(title)} - + + + - - -
+ +
@@ -494,7 +495,7 @@ export function renderExternalAppShell(opts: ExternalAppShellOptions): string {
-
+
@@ -514,8 +515,7 @@ export function renderExternalAppShell(opts: ExternalAppShellOptions): string {
+ + ${cssBlock} - - -
+ +
@@ -744,8 +745,7 @@ export function renderModuleLanding(opts: ModuleLandingOptions): string {
${bodyContent}