Skip to content

Stats PR A: color contrast helpers + ClassNameChip - #31

Merged
sandervonk merged 1 commit into
mainfrom
cursor/stats-pr-a-color-chip-181f
Sep 4, 2026
Merged

Stats PR A: color contrast helpers + ClassNameChip#31
sandervonk merged 1 commit into
mainfrom
cursor/stats-pr-a-color-chip-181f

Conversation

@sandervonk

Copy link
Copy Markdown
Member

Summary

Vue-only foundation for Stats chip restyle (PR A):

  • src/common/color.ts — pure helpers to mix class color against flat page --color-bg (opaque hex, not + '2d' alpha) and pick a readable foreground (~WCAG 4.5:1 when possible).
  • src/components/Portal/ClassNameChip.vue — overlay chip markup/CSS (button_pointer_text class_name, padding/radius tokens), wires mix + text into --color-class / --color-class-alt, reads live --color-bg for theme toggle.
  • Minimal proof — ViewTask class chip swapped to ClassNameChip (same link behavior).
  • Testsnpm run test:color + CI step.

Out of scope

  • StatsModal / TeacherStatsModal restyle (PR B)
  • Server / nested delete / P4 prove

Test plan

  • npm run test:color
  • npm run lint
  • CI green on this PR
  • Spot-check ViewTask chip in light + dark theme
Open in Web Open in Cursor 

Add pure mix-against-page-bg and WCAG-ish readable text helpers,
a reusable ClassNameChip matching overlay chip styles, unit tests
wired into CI, and a minimal ViewTask proof swap.

Co-authored-by: Sander Vonk <sandervonk@users.noreply.github.com>
@sandervonk
sandervonk marked this pull request as ready for review September 4, 2026 04:11
@sandervonk
sandervonk merged commit 0b7980e into main Sep 4, 2026
1 check passed
@sandervonk
sandervonk deleted the cursor/stats-pr-a-color-chip-181f branch September 4, 2026 04: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.

2 participants