Skip to content

Commit 44535dc

Browse files
docs(web): fix docs sidebar positioning to stay fixed on scroll with proper alignment and symmetric spacing.
Exactly reproduce sidebar behavior so the docs layout remains stable while scrolling, with consistent spacing and alignment across breakpoints. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
1 parent 65b7494 commit 44535dc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

web/src/app/docs/layout.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ export default function DocsLayout({
3535
return (
3636
<div className="pt-8">
3737
<div className="container flex md:space-x-8 overflow-x-hidden">
38-
<DocSidebar
39-
className="hidden lg:block w-64 shrink-0 sticky top-[24px] h-[calc(100vh-24px)] overflow-y-auto pr-4"
40-
onNavigate={() => setOpen(false)}
41-
/>
38+
<div className="hidden lg:block w-64 shrink-0">
39+
<DocSidebar
40+
className="fixed top-24 w-64 h-[calc(100vh-12rem)] overflow-y-auto pr-4 z-40"
41+
onNavigate={() => setOpen(false)}
42+
/>
43+
</div>
4244
<main className="flex-1 mx-auto pb-36 md:px-8 min-w-0">{children}</main>
4345
</div>
4446
<div className="flex items-center lg:hidden sticky bottom-0 z-50 bg-background/80 backdrop-blur-sm container p-4 rounded-t-lg border-t">

0 commit comments

Comments
 (0)