Skip to content

feat: tokens, icon set and no inline styles (UX-10, part B) - #215

Merged
bri-b-dev merged 1 commit into
mainfrom
b/a11y-tokens-icons
Oct 11, 2026
Merged

bri-b-dev merged 1 commit into
mainfrom
b/a11y-tokens-icons

Conversation

@bri-b-dev

Copy link
Copy Markdown
Owner

Summary

Completes UX-10 (part A: dialogs, focus, contrast, axe - #214).

  • No static inline styles: 40 style="..." attributes replaced by classes (shared section-head, section-title, spinner, btn-danger, row-*, ...; scoped classes elsewhere). :style remains only for data-driven geometry (bar widths, marker positions, confetti, a measured height)
  • One icon set: AppIcon with 13 outline icons (24 px grid, currentColor, decorative unless labeled) replaces the emojis (balls, clubs, tools, timer, award, trend, chart ...). Collections now store an icon name; collections from earlier versions that hold an emoji are still shown (CollectionIcon)
  • Tokens instead of literals: hex colors in components (radar, bars, confetti palette, sparkline, level colors), Tailwind palette classes (text-gray-600, bg-zinc-50, bg-red-50, border-t-blue-500, ...), border radii (999px, 14px, ...) and the z-index: 9999 toast now use --primary, --danger-*, --radius-*, --z-* etc. The settings danger zone and switch rows follow the theme in dark mode
  • Guard tests (tests/a11y/system.test.ts) scan the sources and name file and line: no static inline styles, :style without color/spacing/typography, no emoji, no hex colors in components (one documented exception: the native status bar), no palette classes, radii > 6 px only via tokens, no literal z-index

Bugs found by the guards / while converting

  • The header had no background: bg-app-bg/80 is not generated for CSS-variable colors, so content scrolled under a transparent header. Now color-mix from --bg
  • Targets table: the highlighted row used a light-only green (bg-emerald-50)
  • "Drill nicht gefunden": the markup was broken (an empty self-closing <output> followed by loose content); now a proper status card (tested)
  • text-gray-600 on dark surfaces in three loading/empty states (low contrast); spinner colors ignored the theme

Numbers

Start JS 148.0 KB (+0.8 KB for the icon set), CSS 22.0 KB, tests 437 -> 452, lint 0 errors.

Test plan

  • npm test, npm run lint, npm run typecheck, npm run build (local)
  • CI
  • Visual check in light and dark: header (now with a translucent background), drill detail chips with icons, stats chart (bars and radar), settings (switch rows, danger zone), collections icon picker, loading spinners, targets table highlight

🤖 Generated with Claude Code

- all static inline styles replaced by classes (shared section-head/section-title/spinner/btn-danger,
  scoped classes); :style only for data-driven geometry
- AppIcon with 13 outline icons replaces emojis; collection icons stored by name (older emojis still shown)
- hard-coded hex colors, Tailwind palette classes, border radii and z-index literals replaced by tokens
  (radar/bars, confetti, level colors, settings danger zone, theme.css)
- guard tests scan sources for inline styles, emojis, hex colors, palette classes, radii, z-index
- fixes: header had no background (bg-app-bg/80 is not generated for CSS variables), light-only table
  highlight, broken "drill not found" markup, text-gray-600 in dark mode
- tests (452)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bri-b-dev
bri-b-dev merged commit 65f1322 into main Oct 11, 2026
1 check passed
@bri-b-dev
bri-b-dev deleted the b/a11y-tokens-icons branch October 11, 2026 09:02
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