fix(decnet_web/css): light-mode contrast across wizards, code blocks, hovers
Sweeps four invariant violations that were leaking dark surfaces
into light mode and producing the unreadable / inverted areas:
1. Hardcoded `color: #000` in 14 :hover rules across 11 CSS
files swapped to `color: var(--bg)` — collapses to #000 in
dark mode (no-op), becomes cream in light. Fixes DEPLOY
DECKIES (button hover was rendering charcoal-purple text on
charcoal-purple background).
2. Hardcoded `background: #000` (3 sites) and `#0d1117`
(3 sites) replaced with `var(--bg)` / `var(--panel)`. Fixes
code blocks and modal panels staying dark on cream — the
deploy-wizard preview, topology-creation NAME input, and the
MazeNET canvas backdrop now follow the active theme.
3. `rgba(0,0,0,0.35)` and `rgba(0,0,0,0.5)` input/card
backgrounds (ServiceConfigForm, DeckyFleet .input)
swapped to `var(--panel)`. Fixes per-service config rows
in the deploy wizard rendering as dark slabs.
4. SVG arrow markers in MazeNET Canvas.tsx hardcoded
`fill="#00ff41"` / "#ee82ee" — replaced with currentColor +
style hook so they re-resolve on theme change.
New behaviour: light-mode hovers tint instead of inverting. The
dark-mode rules fully fill bg with --matrix/--violet/--alert and
flip text to --bg; that lands cream-on-near-ink in light mode
and reads as a jarring colour inversion every cursor move. Light
mode now layers a *-tint-10 background and keeps text in its
base colour. Single override block in index.css targets every
scoped `.X-btn`/`.btn`/`button:hover` via :is() + [class*="-btn"]
so we don't have to chase every component file.
This commit is contained in:
@@ -46,7 +46,7 @@ body.maze-fullscreen .maze-shell {
|
||||
gap: 8px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.maze-btn:hover { background: var(--matrix); color: #000; box-shadow: var(--matrix-glow); }
|
||||
.maze-btn:hover { background: var(--matrix); color: var(--bg); box-shadow: var(--matrix-glow); }
|
||||
.maze-btn.ghost { border-color: var(--border); color: var(--matrix); opacity: 0.7; }
|
||||
.maze-btn.ghost:hover {
|
||||
background: transparent; color: var(--matrix); opacity: 1;
|
||||
@@ -127,14 +127,14 @@ body.maze-fullscreen .maze-shell {
|
||||
|
||||
/* ── Canvas ─────────────────────────────────── */
|
||||
.maze-canvas-wrap {
|
||||
position: relative; background: #000;
|
||||
position: relative; background: var(--bg);
|
||||
overflow: hidden; user-select: none;
|
||||
height: 100%; min-height: 0;
|
||||
}
|
||||
.maze-pan-layer { position: absolute; inset: 0; will-change: transform; }
|
||||
.maze-grid-bg {
|
||||
position: absolute; inset: 0;
|
||||
pointer-events: none; opacity: 0.6; overflow: hidden; background: #000;
|
||||
pointer-events: none; opacity: 0.6; overflow: hidden; background: var(--bg);
|
||||
}
|
||||
.maze-grid-bg svg { display: block; width: 100%; height: 100%; }
|
||||
.maze-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
|
||||
@@ -372,7 +372,7 @@ body.maze-fullscreen .maze-shell {
|
||||
padding: 30px 10px; font-size: 0.7rem; letter-spacing: 1px;
|
||||
}
|
||||
.maze-diff {
|
||||
background: #000; border: 1px solid var(--border);
|
||||
background: var(--bg); border: 1px solid var(--border);
|
||||
padding: 10px 12px; font-size: 0.68rem; line-height: 1.6;
|
||||
white-space: pre; overflow-x: auto;
|
||||
}
|
||||
@@ -562,7 +562,7 @@ body.maze-fullscreen .maze-shell {
|
||||
}
|
||||
.maze-btn.alert:hover {
|
||||
background: var(--alert);
|
||||
color: #000;
|
||||
color: var(--bg);
|
||||
box-shadow: 0 0 10px rgba(255, 65, 65, 0.5);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user