From de7d7d803913dded758c1d0bc00aa4b3bcdcb347 Mon Sep 17 00:00:00 2001 From: Locust agent Date: Tue, 3 Nov 2026 01:58:22 +0000 Subject: [PATCH] fix(theme): follow prefers-color-scheme until the reader chooses The theme was resolved once at mount, so the site did not follow a later change of the system preference while no explicit choice was stored. The design contract asks for the site to keep following the system until the reader makes a choice. The theme module now subscribes to the prefers-color-scheme change event and applies the new system preference while nothing is stored. A stored choice still wins and stops the site from following the system. The toggle subscribes to theme changes, so its icon and its accessible label stay in step with the active theme. --- public/src/components/theme/ThemeToggle.vue | 12 ++++- public/src/components/theme/theme.js | 54 ++++++++++++++++++++- 2 files changed, 62 insertions(+), 4 deletions(-) diff --git a/public/src/components/theme/ThemeToggle.vue b/public/src/components/theme/ThemeToggle.vue index e864af6..9f3b414 100644 --- a/public/src/components/theme/ThemeToggle.vue +++ b/public/src/components/theme/ThemeToggle.vue @@ -1,6 +1,6 @@