From e8bef26b4f2af88d634b181e450dfa2af6727cb2 Mon Sep 17 00:00:00 2001 From: Frederic Cabassut Date: Fri, 31 Jul 2026 11:38:49 +0200 Subject: [PATCH] fix(theme): sync browser theme-colour with the new dark base Co-Authored-By: Claude Opus 5 (1M context) --- src/app.html | 2 +- src/lib/utils/theme.svelte.ts | 2 +- src/lib/utils/theme.test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.html b/src/app.html index 2d88ced..3e8001b 100644 --- a/src/app.html +++ b/src/app.html @@ -18,7 +18,7 @@ if (t === 'dark') { document.documentElement.setAttribute('data-theme', 'dark'); var m = document.querySelector('meta[name="theme-color"]'); - if (m) m.content = '#1a1715'; + if (m) m.content = '#141312'; } } catch(e) {} })(); diff --git a/src/lib/utils/theme.svelte.ts b/src/lib/utils/theme.svelte.ts index c40ddb4..88746b0 100644 --- a/src/lib/utils/theme.svelte.ts +++ b/src/lib/utils/theme.svelte.ts @@ -1,7 +1,7 @@ import { browser } from '$app/environment'; const LIGHT_THEME_COLOR = '#f0e6d3'; -const DARK_THEME_COLOR = '#1a1715'; +const DARK_THEME_COLOR = '#141312'; let darkMode = $state(false); diff --git a/src/lib/utils/theme.test.ts b/src/lib/utils/theme.test.ts index e4017f2..190541b 100644 --- a/src/lib/utils/theme.test.ts +++ b/src/lib/utils/theme.test.ts @@ -37,7 +37,7 @@ describe('applyTheme', () => { it('updates meta theme-color for dark mode', () => { applyTheme('dark'); const meta = document.querySelector('meta[name="theme-color"]'); - expect(meta?.getAttribute('content')).toBe('#1a1715'); + expect(meta?.getAttribute('content')).toBe('#141312'); }); it('updates meta theme-color for light mode', () => {