Skip to content

chore(gui): remove dead/shadowing CSS and sweep tokens - #254

Merged
CameronBrooks11 merged 1 commit into
mainfrom
chore/248-css-hygiene
Jun 27, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
chore/248-css-hygiene

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Closes #248. Part of epic #246 (post-redesign audit follow-ups). Blocker.

Problem

The redesign left React-era global CSS that shadowed the scoped shell components, plus dead/duplicate tokens — the copy-by-hand drift the consolidation pass existed to remove.

  • [HIGH] layout.css:2-67 re-declared .menubar*/.statusbar* that MenuBar.svelte/StatusBar.svelte already define in scoped <style>. Declarations present only in the global rule leaked untokenized magic spacing into the new rhythm.
  • Duplicate .statusbar__dirty; dead tokens; unused dimension tokens; magic rail widths and 7px-vs-8px dots.

Fix

  • Deleted the .menubar*/.statusbar* blocks from layout.css (verified both classes are owned by the scoped components). Only .error-boundary stays global.
  • Collapsed duplicate status pairs → one canonical each (--color-success-green/-error-red/-warning-orange removed; --status-* aliases repointed). Kept the distinct shades still used (-red-light, -orange-hover, -warning-yellow); dropped unused --color-success-green-hover.
  • Removed dead --color-blue-500/--color-slate-500 (all 3 theme blocks) and unused --panel-header-height/--layer-row-height.
  • Added --rail-width/--rail-width-right (left rail standardized to 300px across Prepare and Machine — Machine was 320px) and --dot-size (consumed by both status dots).

Verification

  • lint:css, lint:css:vars (all token refs resolve), check:svelte (0 errors), tsc, 316/316 tests ✓
  • Live Chrome QA: menubar + statusbar render identically (no regression from removing the shadow CSS); Machine workspace fits cleanly at the 300px rail.

The redesign left React-era global CSS that shadowed the scoped shell, plus
several dead or duplicate tokens.

- Delete the .menubar*/.statusbar* blocks from layout.css. MenuBar.svelte and
  StatusBar.svelte already own these via scoped <style> with proper tokens; the
  globals only leaked untokenized magic spacing (padding: 0 1rem, gap: 0.5rem,
  padding-right: 1.5rem, margin-right: 1rem). Also removes the duplicate
  .statusbar__dirty. Only the .error-boundary group stays global.
- Collapse the duplicate status name pairs to one canonical token each:
  drop --color-success-green / --color-error-red / --color-warning-orange
  (identical to --color-success / --color-error / --color-warning) and point
  the --status-* aliases at the canonical names. Keep the genuinely distinct
  shades still in use (--color-error-red-light, --color-warning-orange-hover,
  --color-warning-yellow) and --color-success-green-hover is dropped (unused).
- Remove dead tokens --color-blue-500 / --color-slate-500 (0 uses) from all
  three theme blocks, and the unused --panel-header-height / --layer-row-height.
- Add --rail-width / --rail-width-right and consume them in PrepareWorkspace
  and MachineWorkspace (left rail standardized to 300px across both), and
  --dot-size consumed by the status dots in ConnectionSection (was 8px) and
  StatusBar (was 7px).

Part of #246. Closes #248.
@CameronBrooks11
CameronBrooks11 merged commit d1a249b into main Jun 27, 2026
18 checks passed
@CameronBrooks11
CameronBrooks11 deleted the chore/248-css-hygiene branch June 27, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GUI: remove dead/shadowing global CSS + honest token sweep

1 participant