Skip to content

Commit fdcacab

Browse files
jwaldripclaudegithub-actions[bot]
authored
fix(website): docs sidebar overflowing onto footer (#227)
* fix(website): docs sidebar overflowing onto footer Sidebar was fixed-positioned, so it stayed pinned to the viewport and visually overlapped the footer on scroll. Switched to sticky positioning inside a flex layout — sticky releases when its parent ends, so the sidebar now stops at the bottom of the docs content. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(website): use max-h on sidebar to prevent overflow on short pages Co-authored-by: Jason Waldrip <jwaldrip@users.noreply.github.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Jason Waldrip <jwaldrip@users.noreply.github.com>
1 parent 0f8f725 commit fdcacab

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

website/app/components/DocsSidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function DocsSidebar({ navigation }: DocsSidebarProps) {
2222
const pathname = usePathname()
2323

2424
return (
25-
<aside className="fixed right-[max(1rem,calc((100vw-80rem)/2+1rem))] top-20 z-30 hidden h-[calc(100vh-5rem)] w-64 overflow-y-auto pb-8 lg:block">
25+
<aside className="sticky top-20 hidden max-h-[calc(100vh-5rem)] w-64 shrink-0 self-start overflow-y-auto pb-8 lg:block">
2626
<nav className="space-y-6">
2727
{navigation.map((section) => (
2828
<div key={section.title}>

website/app/docs/layout.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ export default function DocsLayout({ children }: { children: ReactNode }) {
66
const navigation = getDocsNavigation()
77

88
return (
9-
<div className="mx-auto max-w-7xl px-4 py-8 lg:py-12 lg:pr-72">
10-
<DocsSidebar navigation={navigation} />
11-
<div className="min-w-0">{children}</div>
9+
<div className="mx-auto max-w-7xl px-4 py-8 lg:py-12">
10+
<div className="lg:flex lg:gap-8">
11+
<div className="min-w-0 flex-1">{children}</div>
12+
<DocsSidebar navigation={navigation} />
13+
</div>
1214
</div>
1315
)
1416
}

0 commit comments

Comments
 (0)