v6.8.0: light theme

The palette lived as ~620 hex literals in inline styles plus a few hundred more in
the stylesheets, so there was no single thing to change. It is now 113 custom
properties in src/styles/theme.css, in two blocks.

src/scripts/theme-boot.js decides the theme before first paint — blocking, in <head>,
above the stylesheet, because a deferred script paints dark first and corrects itself.
It stores the mode ('system' | 'light' | 'dark'), never the colour it resolved to, and
stamps data-theme so an explicit choice can beat the media query. The switcher in the
header is a view onto it.

A filled accent stays the brand colour in both themes — the ink on it is near-black
either way — while an accent used as text darkens to clear 4.5:1 on white. A colour
reaches a fill by four routes (a style property, a constant, a helper argument, an SVG
source string), and tests/theme-switching.test.mjs covers all four.

The dark theme is unchanged: every colour declaration the previous build produced comes
out of this one identically once the properties are resolved.

Also: the roadmap drops its status chips on mobile, and Roadmap.jsx no longer splits a
colour with parseInt at runtime, which a var() reference cannot survive.
This commit is contained in:
lockbitchat
2026-09-04 17:38:41 -04:00
parent 1c153b290a
commit 9e63cf65a4
109 changed files with 4320 additions and 1910 deletions
+6
View File
@@ -38,6 +38,10 @@
"language.suggest.text": "הדף הזה זמין גם בעברית.",
"language.suggest.cta": "לקריאה בעברית",
"language.suggest.dismiss": "סגירה",
"theme.label": "ערכת נושא",
"theme.system": "מערכת",
"theme.light": "בהיר",
"theme.dark": "כהה",
"community.title": "הצטרפו לעתיד של הפרטיות",
"community.description": "SecureBit גדל בזכות הקהילה שלו. הרעיונות והמשוב שלכם מעצבים את עתיד התקשורת המאובטחת - נבנה בגלוי, עם אימות ASN.1 מלא מקצה לקצה.",
"community.github": "מאגר GitHub",
@@ -322,6 +326,8 @@
"pwa.iosStep3Hint": "אשרו כדי להתקין את SecureBit.chat",
"pwa.genericTitle": "התקנת SecureBit",
"pwa.genericDesc": "לכל דפדפן דרך משלו להתקין. בחרו את השלבים שמתאימים לשלכם.",
"pwa.androidChromeHint": "הקישו על ⋮ בפינה העליונה ובחרו ב־”התקנת אפליקציה”",
"pwa.androidOtherHint": "פתחו את התפריט ובחרו ב־”הוספה למסך הבית”",
"pwa.gotIt": "הבנתי",
"pwa.installedTitle": "האפליקציה הותקנה!",
"pwa.installedIos": "אפליקציית iOS הותקנה! פתחו ממסך הבית.",