Skip to content

fix: add missing --fg-on-accent to light theme, remove dead vars, strengthen CSS guardrails#315

Merged
tomasz-tomczyk merged 1 commit intomainfrom
fix/theme-css-guardrails
Apr 20, 2026
Merged

fix: add missing --fg-on-accent to light theme, remove dead vars, strengthen CSS guardrails#315
tomasz-tomczyk merged 1 commit intomainfrom
fix/theme-css-guardrails

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Fix --fg-on-accent regression from fix: resolve WCAG AA color contrast violations #301: missing from [data-theme="light"] block, causing unreadable btn-primary text (dark navy on dark blue) when users explicitly select Light theme
  • Remove dead --btn-primary-bg/fg/border vars (defined but never referenced — debris from fix: resolve WCAG AA color contrast violations #301)
  • Remove dead --bg-gutter var (defined in all 4 blocks, referenced nowhere)
  • Strengthen check-css-vars.sh with two new checks: dead-definition detection and 4-block completeness verification

Test plan

  • Open crit, click Light theme pill, verify primary buttons have readable white text
  • Run bash scripts/check-css-vars.sh — should pass
  • Temporarily remove a var from one theme block, re-run script — should fail with clear error
  • Temporarily add a defined-but-unreferenced var, re-run — should fail

🤖 Generated with Claude Code

…engthen CSS guardrails

The WCAG fix (#301) introduced a regression: --fg-on-accent was removed from
[data-theme="light"], causing btn-primary text to be unreadable (dark navy on
dark blue) when users explicitly select Light theme.

Also removes dead --btn-primary-bg/fg/border vars (defined but never
referenced) and dead --bg-gutter var found by the strengthened script.

Strengthens check-css-vars.sh with two new checks:
- Dead definitions: vars defined but never referenced via var()
- 4-block completeness: theme vars must appear in all 4 theme blocks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit e32a159 into main Apr 20, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the fix/theme-css-guardrails branch April 20, 2026 07:11
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.

1 participant