feat(v0.5.0-prep): light mode support across all three surfaces
Implements the v0.4.0-plan-noted light mode using `@media (prefers-color-scheme: light)` blocks that override the :root CSS variables. The extension now auto-follows the user's OS theme — no toggle, no setting, no preference UI required (Phase 2 toggle deferred to a later release if anyone asks for it). Light-mode palette preserves brand identity: --bg #f6f4ed cream-leaning off-white --bg-soft #ece5d2 header / footer bars --bg-row #ddd6c0 hover backgrounds --bg-row-hi #c8c0a8 active rows --fg #2a2f28 dark forest-green-leaning text --fg-muted #6a7064 secondary text --accent #2a7d3e darker brand green (primary on light) --accent-dim #6dbf7a lighter brand green (secondary) --cream #b8861a darker amber — readable on light bg --danger #b53a2b darker red — readable on light bg Every existing CSS rule using var(--*) tokens carries over unchanged. The only surface-specific overrides are: - State pills (popup + newtab) — text colour flips to white when the background becomes solid accent/cream/danger - Primary play button (pressed state) — text colour flips - Helmet watermark on NewTab — opacity bumped 0.025 → 0.04 via a new --watermark-opacity var since the helmet contrasts differently against the lighter background - Toast (Options) — text colour flips to white on solid bg - Danger button hover (Options) — text colour flips to white Total: 3 files, +98 lines, 1 line modified. Bundled with the v0.4.1-prep back-link fix already merged into this branch. Together: a complete UX polish release (first-run hint shipped in v0.4.0 plus back-link plus light mode = v0.5.0).
This commit is contained in:
@@ -16,6 +16,34 @@
|
||||
--radius: 6px;
|
||||
}
|
||||
|
||||
/* ──────────────────────────────────────────────────────────────────────
|
||||
Light mode (v0.5.0) — auto-follows OS theme. Same approach as popup
|
||||
+ newtab: flip the :root vars only. Existing rules using var(--*)
|
||||
carry over unchanged. Toast text + danger-button hover adjusted for
|
||||
light-bg readability.
|
||||
────────────────────────────────────────────────────────────────────── */
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
--bg: #f6f4ed;
|
||||
--bg-soft: #ece5d2;
|
||||
--bg-row: #ddd6c0;
|
||||
--bg-row-hi: #c8c0a8;
|
||||
--fg: #2a2f28;
|
||||
--fg-muted: #6a7064;
|
||||
--accent: #2a7d3e;
|
||||
--accent-dim: #6dbf7a;
|
||||
--cream: #b8861a;
|
||||
--danger: #b53a2b;
|
||||
}
|
||||
|
||||
/* Toast — keep readable when its background is solid accent / danger */
|
||||
.opt-toast { color: #fff; }
|
||||
.opt-toast[data-tone="error"] { color: #fff; }
|
||||
|
||||
/* Danger button hover — text flips to white when bg goes red */
|
||||
.opt-btn--danger:hover { color: #fff; }
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
html, body {
|
||||
|
||||
Reference in New Issue
Block a user