Skip to content

Overhaul interactive surface tokens and icon handling - #32

Merged
GregorGabric merged 1 commit into
mainfrom
fix/interactive-surface-tokens
Jul 13, 2026
Merged

GregorGabric merged 1 commit into
mainfrom
fix/interactive-surface-tokens

Conversation

@GregorGabric

Copy link
Copy Markdown
Owner

Summary

Reworks how interactive states (hover / selected / focused) are colored across the registry, fixing two recurring bug classes:

  • Invisible in light mode — surfaces built on muted (oklch 0.97 on a white page): grid-list selection, toggle/toggle-group selected state, outline/plain button hover, badge secondary hover, command-menu Esc hint.
  • Primary blue in dark mode — surfaces built on accent, which was aliased to the primary blue in the dark theme: select/dropdown/menu/combo-box item hover, command palette selection, selected-tab hover.

Token change

Dark --accent is retuned from the primary blue to a neutral (oklch 0.269 0.007 34.298), giving accent shadcn-ecosystem semantics: a neutral interactive surface in both themes. All hover/selected surfaces now use it; vendored shadcn components (e.g. command) work unedited. The one legitimately-blue accent consumer (grid-list drop-target border) moves to primary, matching the existing DropIndicator rule.

Icon handling

Icons inside buttons/toggles/triggers now inherit currentColor like shadcn, instead of being mixed 60% toward the button background (the "muddy" look). The --btn-icon/--btn-icon-active indirection is removed from button and its dead copy-pasted references cleaned out of toggle, toggle-group, and select. Toggle + toggle-group also gain button-style svg.lucide sizing and the un-sized-svg fallback — their own demo icons previously escaped every sizing rule.

Component polish

  • Grid-list: label/description stack with proper spacing (block on the Text spans); wider spacer with a minimum gap
  • Toggle-group: heavy inset-ring-foreground/20 selected outline removed; multiple-selection mode unified with the single-mode rounded-chip look
  • Toggle: isCircle prop was typed but never wired — it now works and no longer leaks onto the DOM button
  • Badge (secondary): hover deepens (bg-border) instead of fading toward white
  • Registry JSON rebuilt via registry:build

Test plan

  • Verified in the docs app in both color schemes via browser automation: computed colors of focused/selected/hover states resolve to the intended tokens (no blue in dark, visible gray in light)
  • Interactions exercised: select open/option focus, toggle + toggle-group clicks, grid-list selection
  • pnpm typecheck and ESLint pass on all touched files

🤖 Generated with Claude Code

Retune accent to shadcn semantics — a neutral hover/selected surface in
both themes — and rebuild every interactive state on it:

- globals.css: dark --accent was aliased to the primary blue, so any
  bg-accent hover flashed blue in dark mode; it is now a neutral
  (oklch 0.269 0.007 34.298) with standard foreground text
- dropdown/select/combo-box/menu/list-box, command, tabs, toggle,
  toggle-group, grid-list, and outline/plain button hover/selected
  surfaces all use accent; muted-based surfaces (invisible at
  oklch 0.97 on white) are gone
- grid-list drop-target border moves from accent to primary, matching
  the DropIndicator rule

Icons now inherit currentColor like shadcn: the --btn-icon/-active
dimming vars (icons mixed 60% toward the button background) are removed
from button and the dead copies in toggle/toggle-group/select cleaned
up. Toggle and toggle-group gain button-style svg.lucide sizing and the
un-sized-svg fallback; their demos' raw lucide icons previously escaped
all sizing rules.

Also: GridListLabel/Description render as block so label and
description stack with spacing; wider GridListSpacer; toggle-group
drops the heavy selected ring and unifies multiple-selection mode with
the single-mode chip look; Toggle wires up its previously dead isCircle
prop (it leaked to the DOM); badge secondary hover deepens instead of
fading; command-menu Esc hint hover is visible in light mode.

Registry JSON rebuilt via registry:build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ui Ready Ready Preview, Comment Jul 10, 2026 7:28am

@GregorGabric
GregorGabric merged commit 64dc139 into main Jul 13, 2026
5 checks passed
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