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:
@@ -33,6 +33,10 @@
|
||||
"language.suggest.text": "Cette page est aussi disponible en français.",
|
||||
"language.suggest.cta": "Lire en français",
|
||||
"language.suggest.dismiss": "Fermer",
|
||||
"theme.label": "Thème",
|
||||
"theme.system": "Système",
|
||||
"theme.light": "Clair",
|
||||
"theme.dark": "Sombre",
|
||||
"community.title": "Construisez l'avenir de la vie privée",
|
||||
"community.description": "SecureBit grandit grâce à sa communauté. Vos idées et vos retours façonnent l'avenir des communications sécurisées, développées à ciel ouvert, avec une validation ASN.1 complète de bout en bout.",
|
||||
"community.github": "Dépôt GitHub",
|
||||
@@ -317,6 +321,8 @@
|
||||
"pwa.iosStep3Hint": "Confirmez pour installer SecureBit.chat",
|
||||
"pwa.genericTitle": "Installer SecureBit",
|
||||
"pwa.genericDesc": "Chaque navigateur installe à sa manière. Choisissez les étapes qui correspondent au vôtre.",
|
||||
"pwa.androidChromeHint": "Appuyez sur ⋮ en haut, puis sur « Installer l’application »",
|
||||
"pwa.androidOtherHint": "Ouvrez le menu, puis « Ajouter à l’écran d’accueil »",
|
||||
"pwa.gotIt": "Compris",
|
||||
"pwa.installedTitle": "Application installée !",
|
||||
"pwa.installedIos": "Application iOS installée ! Ouvrez-la depuis l'écran d'accueil.",
|
||||
|
||||
Reference in New Issue
Block a user