fix(popover): stronger, centralized active-row highlight (UAT finding)
The roving-focus row in every popover menu was barely distinguishable from the menu surface — an accent fill at only 24%, and the recipe was copy-pasted across 5 consumers. Centralize it in PopoverItem (ACTIVE_HIGHLIGHT, applied to every item) and strengthen it: accent/35 fill + a 1px inset accent ring for a defined edge that reads across all 6 schemes in both themes. Consumers no longer carry the recipe. Uses the now-working `bg-accent/NN` / `ring-accent/NN` utilities (v4 does the opacity modifier via color-mix) instead of the old hand-written color-mix arbitrary value the v3 no-op forced. Verified in-browser: fill + inset ring render on the active item, dark and light.
This commit is contained in:
@@ -94,7 +94,7 @@ export default function ViewSwitcher<T extends string>({
|
||||
setOpen(false);
|
||||
}}
|
||||
label={o.label}
|
||||
className={`w-full flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm text-left outline-hidden transition data-active:bg-[color-mix(in_srgb,var(--accent)_24%,transparent)] ${
|
||||
className={`w-full flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm text-left outline-hidden transition ${
|
||||
on ? "text-accent" : "text-fg hover:bg-card"
|
||||
}`}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user