fix(design): the button and chip hover colours were never generated — an act: variant instead of a runtime prefix (E28)
buttonStyles/chipStyles glued the hover guard on at runtime (`${ACT}hover:text-fg`). Tailwind emits CSS
only for a class it finds whole in the source, so all 22 guarded hovers shipped with no rule: no text or
edge colour on hover for ghost/outline/danger buttons, no white layer on the player's control row, no
underline on a link button, no accent hover on token/suggest/ghost chips. The stylesheet had 0 rules
for `not-aria-disabled`.
- `@custom-variant act` (index.css): the same guard as the state layers; `:disabled` never matches an
<a>, so one variant serves buttons and links and the per-element variant maps go.
- ui/tailwindScan.contract.test.ts: every class the primitives can emit stands whole in their source.
- a lint rule refuses a variant right after an interpolation; the `enabled:hover:` rule now points at
`act:hover:`.
This commit is contained in:
@@ -34,10 +34,7 @@ export function LinkButton({
|
||||
children: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<a
|
||||
className={clsx(buttonClass({ variant, size, fullWidth, element: "link" }), className)}
|
||||
{...rest}
|
||||
>
|
||||
<a className={clsx(buttonClass({ variant, size, fullWidth }), className)} {...rest}>
|
||||
{icon}
|
||||
{children}
|
||||
</a>
|
||||
@@ -63,7 +60,7 @@ export function IconLink({
|
||||
<a
|
||||
aria-label={label}
|
||||
title={label}
|
||||
className={clsx(iconButtonClass({ variant, size, element: "link" }), className)}
|
||||
className={clsx(iconButtonClass({ variant, size }), className)}
|
||||
{...rest}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user