fix(studio): a menu row's highlight is rounder than its panel (#7395)

This commit is contained in:
Miguel Ángel
2026-11-08 04:46:46 +00:00
committed by GitHub
parent adf14d7324
commit ab785e9c5c
2 changed files with 9 additions and 1 deletions
@@ -434,4 +434,12 @@ describe("open motion", () => {
/\.duration-open \{[\s\S]*?prefers-reduced-motion: reduce[\s\S]*?transition-duration: 0ms/,
);
});
it("rounds a row's highlight more than the panel that holds it", async () => {
await openActionMenu();
const rowRadius = [...items()[0]!.classList].find((c) => c.startsWith("rounded-"))!;
expect([...popup()!.classList]).toContain("rounded-lg");
expect(compileStudioCss([rowRadius])).toMatch(/calc\(var\(--radius-lg\) \+ 6px\)/);
});
});
+1 -1
View File
@@ -72,7 +72,7 @@ const menuPopup = cn(popupSurface, "min-w-36 p-1 shadow-menu");
/** One row. `data-highlighted` is set by keyboard and pointer alike, so the seen row is the Enter row. */
const itemBase = cn(
"flex cursor-default select-none items-center justify-between gap-6 rounded-sm px-2 py-1.5",
"flex cursor-default select-none items-center justify-between gap-6 rounded-[calc(var(--radius-lg)+6px)] px-2 py-1.5",
"text-step-11 whitespace-nowrap text-text-1",
"outline-hidden transition-colors ease-out-quint duration-hover",
"data-[highlighted]:bg-hover data-[highlighted]:text-text-0",