fix(a11y): dark-adapt stroke semantic tokens (D12) - #26
Conversation
Remap dark --Colors-Stroke-* onto dark neutrals/primary so borders no longer glow near-white on dark surfaces, and dark-adapt the tertiary button border token consumers were patching locally. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughDark-mode stroke tokens now map to darker neutral and primary values. The tertiary button border uses a dark neutral token in dark mode. Contrast tests now calculate luminance and verify stroke adaptation, luminance ordering, and tertiary-border behavior. Documentation describes the remapping, semantic stroke-token usage, and expanded contrast coverage. Mergeability Score: ⚪ Minimal · up to This change updates dark-mode stroke and tertiary button tokens with regression coverage; no actionable merge-blocking risk remains beyond normal checks and design review. 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
Comment |
|
I don't like this. |
Summary
Closes #23 ([a11y][D12]). Dark-mode
--Colors-Stroke-*tokens no longer copy the light near-white scale, so borders/dividers stop glowing on dark surfaces. Visual change for all DS consumers — please confirm with design-system owners before merge (same process as A7/A8).Also dark-adapts
--Colors-Buttons-Tertiary-Default(the tertiary border color), which stayedNeutral-300in dark and was the ChatCPT local workaround.Token changes (dark only; light unchanged)
--Colors-Stroke-Background--Colors-Stroke-Lighter--Colors-Stroke-Light--Colors-Stroke-Default--Colors-Stroke-Medium--Colors-Stroke-Strong--Colors-Stroke-Stronger--Colors-Stroke-Primary--Colors-Stroke-Primary-Light--Colors-Stroke-Primary-Medium--Colors-Stroke-Primary-Dark--Colors-Buttons-Tertiary-DefaultValues align with existing dark input/box borders and A7’s Primary-450 focus token. Lighter → Stronger rank is preserved (closer to Main-Top → more contrast).
Notes for consumers
app.csstertiary border override (--Colors-Buttons-Tertiary-Default)Test plan
npm test— 48/48, including new D12 regression intests/contrast-tokens.spec.js(dark strokes ≠ light near-white; Strong > Default luminance; tertiary border adapts)colors/test.html, modal, table, input, tertiary button)Made with Cursor