From f562df84374ab1745b70c03a7abc9c474181fea9 Mon Sep 17 00:00:00 2001 From: Deeman Date: Sat, 14 Feb 2026 00:16:31 +0100 Subject: [PATCH] fix heading colors on dark-OS systems, increase logo size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The heading color override (bare h1 selector, specificity 0,0,1) was losing to Pico's theme-scoped heading rules ([data-theme=light] h1, specificity 0,1,1). On systems with prefers-color-scheme: dark, Pico's dark heading colors (#f0f1f3 — near white) leaked through, making headings invisible on the light background. Fix: scope heading overrides under [data-theme="light"] to match Pico's specificity. Also bump nav logo from 24px to 32px, footer to 24px. Visual tests now run with color_scheme="dark" to catch this class of bug. Co-Authored-By: Claude Opus 4.6 --- .../src/padelnomics/static/css/custom.css | 11 +++++++++-- .../src/padelnomics/templates/base.html | 4 ++-- .../tests/screenshots/landing_full.png | Bin 420612 -> 422065 bytes .../tests/screenshots/landing_mobile.png | Bin 341617 -> 343139 bytes padelnomics/tests/screenshots/login.png | Bin 69045 -> 70559 bytes padelnomics/tests/screenshots/signup.png | Bin 81683 -> 83224 bytes padelnomics/tests/test_visual.py | 7 +++++-- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/padelnomics/src/padelnomics/static/css/custom.css b/padelnomics/src/padelnomics/static/css/custom.css index fced317..ade5d97 100644 --- a/padelnomics/src/padelnomics/static/css/custom.css +++ b/padelnomics/src/padelnomics/static/css/custom.css @@ -44,8 +44,15 @@ --pico-form-element-focus-color: #3B82F6; } -/* Headings — Deep Navy, Inter (belt-and-suspenders override) */ -h1, h2, h3, h4, h5, h6 { +/* Headings — Deep Navy, Inter + Specificity must match Pico's [data-theme=light] h1 (0,1,1) + to win over dark-mode heading colors on dark-OS systems. */ +[data-theme="light"] h1, +[data-theme="light"] h2, +[data-theme="light"] h3, +[data-theme="light"] h4, +[data-theme="light"] h5, +[data-theme="light"] h6 { --pico-color: #0F172A; color: #0F172A; font-family: 'Inter', system-ui, -apple-system, sans-serif; diff --git a/padelnomics/src/padelnomics/templates/base.html b/padelnomics/src/padelnomics/templates/base.html index 210a407..c3616bb 100644 --- a/padelnomics/src/padelnomics/templates/base.html +++ b/padelnomics/src/padelnomics/templates/base.html @@ -20,7 +20,7 @@