From 36de7cfa2f6d82d8f9671ac0da5484c94b732b46 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sun, 19 Apr 2026 20:12:34 -0400 Subject: [PATCH] fix(reader): dark text on dark themes and add toggle icons Two fixes: 1. Remove base typography block from foliate-themes.css. The html/body rules were unlayered CSS that overrode the chrome theme's layered body styles, causing dark reading theme text colors (--reader-text) to apply to the outer chrome UI on dark backgrounds. These styles are only meant for the shadow DOM, which getCSS() already handles. 2. Move missing typography rules (img, blockquote, a, p orphans/widows) into getCSS() so the shadow DOM still gets them. 3. Add sun/moon emoji indicators to the light/dark toggle switch. --- templates/reader.templ | 9 +++---- templates/reader_templ.go | 8 +++---- web/src/reader/reader.ts | 20 ++++++++++++++++ web/static/foliate-themes.css | 44 +---------------------------------- web/static/style.css | 2 +- 5 files changed, 31 insertions(+), 52 deletions(-) diff --git a/templates/reader.templ b/templates/reader.templ index 8b72cdc..46f8e29 100644 --- a/templates/reader.templ +++ b/templates/reader.templ @@ -190,15 +190,16 @@ templ ReaderSettingsPanel() {

Reading Theme