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:
@@ -56,7 +56,7 @@
|
||||
.fleet-root .btn.violet { border-color: var(--violet); color: var(--violet); }
|
||||
.fleet-root .btn.violet:hover { background: var(--violet); color: var(--bg); box-shadow: var(--violet-glow); }
|
||||
.fleet-root .btn.alert { border-color: var(--alert); color: var(--alert); }
|
||||
.fleet-root .btn.alert:hover { background: var(--alert); color: var(--bg); box-shadow: 0 0 10px rgba(255, 65, 65, 0.5); }
|
||||
.fleet-root .btn.alert:hover { background: var(--alert); color: var(--bg); box-shadow: 0 0 10px var(--alert); }
|
||||
.fleet-root .btn.ghost { border-color: var(--border); color: var(--matrix); opacity: 0.7; }
|
||||
.fleet-root .btn.ghost:hover { color: var(--matrix); opacity: 1; border-color: var(--matrix); box-shadow: var(--matrix-glow); background: transparent; }
|
||||
.fleet-root .btn.small { padding: 4px 10px; font-size: 0.68rem; }
|
||||
@@ -137,7 +137,7 @@
|
||||
line-height: 1;
|
||||
padding: 2px 8px;
|
||||
border-color: var(--border);
|
||||
color: var(--text-dim, rgba(255,255,255,0.5));
|
||||
color: var(--text-dim, var(--fg-3));
|
||||
letter-spacing: 0;
|
||||
}
|
||||
.tarpit-menu-btn:hover {
|
||||
@@ -173,14 +173,14 @@
|
||||
.tarpit-dropdown-item:last-child { border-bottom: none; }
|
||||
.tarpit-dropdown-item:hover { background: rgba(57,255,20,0.08); }
|
||||
.tarpit-dropdown-item.alert { color: var(--alert); }
|
||||
.tarpit-dropdown-item.alert:hover { background: rgba(255,65,65,0.08); }
|
||||
.tarpit-dropdown-item.alert:hover { background: var(--alert-tint-10); }
|
||||
|
||||
/* Tarpit enable form — rendered below the card footer */
|
||||
.tarpit-form {
|
||||
margin-top: 8px;
|
||||
padding: 10px;
|
||||
border: 1px solid var(--alert);
|
||||
background: rgba(255,65,65,0.04);
|
||||
background: var(--alert-tint-10);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
@@ -194,7 +194,7 @@
|
||||
.tarpit-form input.input {
|
||||
font-size: 0.72rem;
|
||||
padding: 4px 6px;
|
||||
background: rgba(255,255,255,0.04);
|
||||
background: var(--matrix-tint-10);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text-color);
|
||||
}
|
||||
@@ -204,7 +204,7 @@
|
||||
Modal portal; PersonaGeneration.css scopes its own copy under
|
||||
.persona-gen-root, which doesn't match the modal's DOM location. */
|
||||
.info-banner {
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
background: var(--matrix-tint-5);
|
||||
border: 1px solid var(--border);
|
||||
border-left: 3px solid var(--violet);
|
||||
padding: 10px 14px;
|
||||
@@ -222,7 +222,7 @@
|
||||
display: flex; align-items: center; gap: 8px;
|
||||
width: 100%;
|
||||
padding: 8px 12px;
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
background: var(--matrix-tint-5);
|
||||
border: none;
|
||||
color: inherit;
|
||||
font-family: var(--font-mono);
|
||||
@@ -232,7 +232,7 @@
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
}
|
||||
.wizard-svc-toggle:hover { background: rgba(255, 255, 255, 0.05); }
|
||||
.wizard-svc-toggle:hover { background: var(--matrix-tint-10); }
|
||||
.wizard-svc-toggle.open { border-bottom: 1px solid var(--border); }
|
||||
.wizard-svc-caret { color: var(--violet); width: 10px; }
|
||||
.wizard-svc-name { color: var(--matrix); flex: 1; }
|
||||
|
||||
Reference in New Issue
Block a user