Skip to content

Commit 7958577

Browse files
committed
Fix sticky navbar when listbox opens
1 parent 479a601 commit 7958577

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/app/conf/2025/components/navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function Navbar({ links, year }: NavbarProps): ReactElement {
5353
<NavbarPlaceholder className="bg-pri-base before:bg-white/30 dark:bg-pri-darker dark:before:bg-blk/40" />
5454
<header
5555
className={clsx(
56-
"gql-all-anchors-focusable sticky top-0 z-10 w-full border-b border-blk/60 font-mono text-neu-900 antialiased dark:border-white/80",
56+
"gql-all-anchors-focusable sticky top-0 z-[100] w-full border-b border-blk/60 font-mono text-neu-900 antialiased dark:border-white/80",
5757
mobileDrawerOpen && "!border-neu-900 dark:!border-white",
5858
)}
5959
>

src/globals.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,3 +531,8 @@ div[id^="headlessui-menu-items"] {
531531
:root {
532532
--navbar-h: 70px;
533533
}
534+
535+
/* without this Headless UI breaks sticky navbar */
536+
html:has([role="listbox"][data-open]) {
537+
overflow: visible !important;
538+
}

0 commit comments

Comments
 (0)