Fix header user menu button shifting on open (#74)

Base UI's PopoverTrigger injects invisible focus guard <span> elements
as siblings when the popover opens. The space-x-2 utility (which uses
> * + *) applied margin to these spans, causing the button to shift.

Replace space-x-2 with gap-2 which is unaffected by DOM changes.

Co-authored-by: Matt Kane <mkane@cloudflare.com>
This commit is contained in:
Sarah Dayan
2026-04-06 08:32:33 +02:00
committed by GitHub
parent f5d0e8dd17
commit 28f98fda4f

View File

@@ -42,7 +42,7 @@ export function Header() {
<Sidebar.Trigger /> <Sidebar.Trigger />
{/* Right side actions */} {/* Right side actions */}
<div className="flex items-center space-x-2"> <div className="flex items-center gap-2">
{/* View site link */} {/* View site link */}
<LinkButton variant="ghost" size="sm" href="/" external> <LinkButton variant="ghost" size="sm" href="/" external>
<ArrowSquareOut className="h-4 w-4 mr-1" /> <ArrowSquareOut className="h-4 w-4 mr-1" />