fix(decnet_web/css): sweep rgba colour literals to tokens app-wide
Pre-this-commit, ~80 rgba() literals across 24 files were hardcoding alert-red, warn-amber, info-cyan, panel-dark, and white-text-with-alpha shades that bypassed the token cascade. Net effect in light mode: the .eml/SESSREC drawers, AttackerDetail verdict pills, MazeNET net-box headers, OPEN/REPLAY action buttons, threat-intel cards, and all the dim 'whitish' overlays stayed on their dark-mode hex values, producing the unreadable panels in the screenshots. Sweep maps each rgba colour family onto the existing token by alpha bucket — rgba(13,17,23,*) -> var(--panel), rgba(255,65,65,*) -> var(--alert)/-tint-10, rgba(255,170,0,*) and rgba(224,160,64,*) -> var(--warn)/-tint-10, rgba(0,200,255,*) -> var(--info)/-tint-10, rgba(255,255,255,*) -> var(--fg-N)/var(--matrix-tint-N) by alpha. VERDICT_TONE in AttackerDetail (MALICIOUS/SUSPICIOUS/BENIGN/ NO SIGNAL) was the worst offender — string literals '#ff4d4d'/'#ffae42'/'#5fd07a'/rgba(255,255,255,0.4) baked into inline JS styles. Now resolves at render time via var(--alert)/ var(--warn)/var(--ok)/var(--fg-4). New tokens in :root: - --bg-color (alias of --bg) — drawers used this name with #0d1117 fallback that fired in every browser because nothing defined --bg-color. Adding the alias makes drawers re-tone. - --info / --info-tint-10 / --info-tint-30 — REPLAY buttons and any future neutral-secondary use. - --ok — semantic alias for 'verified good' (matrix in dark, emerald in light) so BENIGN pills stay readable across themes. Login.css left intentionally — pre-auth surface, not themed.
This commit is contained in:
@@ -14,11 +14,24 @@
|
||||
|
||||
/* Back-compat names used across the codebase */
|
||||
--background-color: var(--bg);
|
||||
--bg-color: var(--bg); /* used by drawers and other inline styles */
|
||||
--text-color: var(--matrix);
|
||||
--accent-color: var(--violet);
|
||||
--secondary-color: var(--panel);
|
||||
--border-color: var(--border);
|
||||
|
||||
/* Cyan/info — REPLAY buttons, neutral status that's neither
|
||||
* "good/active" (matrix) nor "stop" (alert). */
|
||||
--info: #22d3ee;
|
||||
--info-tint-10: rgba(34, 211, 238, 0.10);
|
||||
--info-tint-30: rgba(34, 211, 238, 0.30);
|
||||
|
||||
/* Benign/healthy — semantic alias for "verified good". Stays
|
||||
* matrix in dark, picks up a darker emerald in light so a
|
||||
* BENIGN pill still reads as "green check" without the dark-mode
|
||||
* neon. */
|
||||
--ok: var(--matrix);
|
||||
|
||||
/* ── Foreground opacities ──────────────────────── */
|
||||
--fg-1: var(--matrix);
|
||||
--fg-2: rgba(0, 255, 65, 0.80);
|
||||
@@ -151,6 +164,16 @@ html[data-theme="light"] {
|
||||
--warn-tint-10: rgba(180, 83, 9, 0.12);
|
||||
--crit-tint-10: rgba(185, 28, 28, 0.10);
|
||||
|
||||
/* Cyan/info dims to slate in light mode so REPLAY buttons read
|
||||
* as a calm secondary against cream rather than an electric pop. */
|
||||
--info: #155e75;
|
||||
--info-tint-10: rgba(21, 94, 117, 0.10);
|
||||
--info-tint-30: rgba(21, 94, 117, 0.20);
|
||||
|
||||
/* Benign in light mode — emerald, the one "happy green" we keep,
|
||||
* tuned dark enough to read on cream. */
|
||||
--ok: #047857;
|
||||
|
||||
/* Glows no-op'd — kept defined so .btn:hover etc. don't
|
||||
* break, just produce no halo. */
|
||||
--matrix-glow: none;
|
||||
|
||||
Reference in New Issue
Block a user