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": "이 페이지는 한국어로도 볼 수 있습니다.",
|
||||
"language.suggest.cta": "한국어로 보기",
|
||||
"language.suggest.dismiss": "닫기",
|
||||
"theme.label": "테마",
|
||||
"theme.system": "시스템",
|
||||
"theme.light": "밝게",
|
||||
"theme.dark": "어둡게",
|
||||
"community.title": "프라이버시의 미래를 함께 만듭니다",
|
||||
"community.description": "SecureBit은 커뮤니티 덕분에 자랍니다. 여러분의 아이디어와 의견이 안전한 소통의 미래를 만듭니다 - 모든 과정이 공개되어 있고, 전 구간에서 ASN.1 검증을 수행합니다.",
|
||||
"community.github": "GitHub 저장소",
|
||||
@@ -317,6 +321,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