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:
@@ -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 ایپ نصب ہو گئی! ہوم سکرین سے کھولیں۔",
|
||||
|
||||
Reference in New Issue
Block a user