Repository navigation
fix(core): ensure pressed overlays override hover - #5516
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR New ComponentsNavItem (@astryxdesign/core)
Modified ComponentsAvatarGroup (@astryxdesign/core) · View in Storybook
Button (@astryxdesign/core) · View in Storybook
Calendar (@astryxdesign/core) · View in Storybook
CommandPalette (@astryxdesign/core) · View in Storybook
ComplexSelector (@astryxdesign/core) · View in Storybook
DateInput (@astryxdesign/core) · View in Storybook
Item (@astryxdesign/core) · View in Storybook
MultiSelector (@astryxdesign/core) · View in Storybook
NumberInput (@astryxdesign/core) · View in Storybook
Outline (@astryxdesign/core) · View in Storybook
Selector (@astryxdesign/core) · View in Storybook
SideNav (@astryxdesign/core) · View in Storybook
Stepper (@astryxdesign/core) · View in Storybook
Token (@astryxdesign/core) · View in Storybook
TopNav (@astryxdesign/core) · View in Storybook
TreeList (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 2 accessibility violation(s) found — 2 serious. Stepper - 1 issue(s)
Token - 1 issue(s)
Visual RegressionStatus: Skipped — Broad stable scope is deferred to the daily release gate. It covers 686 trusted baseline shots instead of recapturing them for this PR. View the report Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
rubyycheung
left a comment
There was a problem hiding this comment.
Looks good from design. The interaction now communicates a clear rest → hover → pressed progression, with the pressed state visibly overriding hover as expected. Applying the same treatment across core interactive surfaces improves consistency while preserving touch and disabled behavior.
cixzhang
left a comment
There was a problem hiding this comment.
Thanks for fixing this in the shared layer. Chromium confirms pressed now wins while disabled, touch, and pseudo-element states stay intact; source/tests cover selected and focus.
[Reviewed by Robohands]
cixzhang
left a comment
There was a problem hiding this comment.
Re-approving after the mechanical main refresh; the reviewed change is unchanged.\n\n[Reviewed by Robohands]
cixzhang
left a comment
There was a problem hiding this comment.
Re-approving after the mechanical main refresh; the reviewed change is unchanged.
[Reviewed by Robohands]
cixzhang
left a comment
There was a problem hiding this comment.
Re-approving after the mechanical main refresh; the reviewed change is unchanged.
[Reviewed by Robohands]
cixzhang
left a comment
There was a problem hiding this comment.
Re-approving after the mechanical main refresh; the reviewed change is unchanged.
[Reviewed by Robohands]
cixzhang
left a comment
There was a problem hiding this comment.
Re-approving after the CI-only retrigger commit; the reviewed change is unchanged.
[Reviewed by Robohands]
Summary
:activeinside the(hover: hover)branch so it ties the guarded hover selector on generated specificity and wins by StyleX pseudo-state order:activebranch for touch input, where(hover: hover)does not matchRoot cause and event semantics
During a pointer press Chromium matches both
:hoverand:active. StyleX puts the media-nested hover rule in a higher priority bucket, which compiled to a selector with more repeated classes than the bare active rule. The cascade therefore kept painting the hover token throughout the press.The shared utility now emits hover and active inside the same hover-capable media branch. Both generated selectors have specificity
(3,4,0), and the active rule is emitted later. A separate enabled active selector remains outside the media query for coarse/touch input. The enabled guard stays outermost, so disabled andaria-disabledsurfaces do not acquire either overlay.Verification
pnpm exec vitest run scripts/build-css.test.mjs— 8 passedpnpm guard:pressed-overlay— Chromium verified hover, simultaneous hover+active, neutral base composition, disabled hover, and touch active fallbackrgba(0, 0, 0, 0.1)overlay instead of hoverrgba(0, 0, 0, 0.05)pnpm -F @astryxdesign/core typecheckpnpm -F @astryxdesign/core lint— 0 errors; 49 pre-existing warningspnpm -F @astryxdesign/core buildFixes #5451