Skip to content

Commit 18cd69c

Browse files
system-confmacbookclaude
authored
fix: sidebar last items hidden behind header on scroll (nodejs#8852)
Fixes nodejs#8521 The sidebar container was using `h-svh` (100svh) with `top-0`, making it exactly viewport height but starting from the top where the header overlaps. This caused the last sidebar items to be clipped when scrolled down. Changes: - Set sidebar top to `var(--header-height)` to position it below the header - Set sidebar height to `calc(100svh - var(--header-height))` to account for the header's vertical space - Removed unnecessary `pb-[var(--header-height)]` padding from sidebar wrapper since the container now correctly sizes itself Co-authored-by: macbook <macbook@macbook-MacBook-Pro.local> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 3da4e98 commit 18cd69c

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

packages/ui-components/src/Containers/Article/index.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
> *:nth-child(1) {
1919
@apply ml:sticky
20-
ml:top-0
21-
ml:h-svh
20+
ml:top-[var(--header-height)]
21+
ml:h-[calc(100svh-var(--header-height))]
2222
ml:overflow-y-auto
2323
[grid-area:sidebar];
2424
}

packages/ui-components/src/Containers/Sidebar/index.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
ml:overflow-auto
66
ml:border-r
77
scrollbar-thin
8-
ml:pb-[var(--header-height)]
98
z-0
109
flex
1110
w-full

0 commit comments

Comments
 (0)