Skip to content

Commit 60b4723

Browse files
committed
fix(landing): make TOC popover header fixed so it doesn't scroll with content
1 parent 8e8cb3f commit 60b4723

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

landing/src/styles/globals.css

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ html:not([data-anchor-scrolling]) {
373373
display: none;
374374
}
375375

376-
/* Sidebar: fixed positioning so it never scrolls with content */
376+
/* Sticky positioning is broken inside the fumadocs grid. Use fixed instead. */
377377
@media (min-width: 768px) {
378378
[data-sidebar-placeholder] {
379379
position: fixed !important;
@@ -382,6 +382,20 @@ html:not([data-anchor-scrolling]) {
382382
}
383383
}
384384

385+
[data-toc-popover] > header {
386+
position: fixed !important;
387+
top: var(--fd-docs-row-2, 0px) !important;
388+
inset-inline-start: 0 !important;
389+
inset-inline-end: 0 !important;
390+
z-index: 10 !important;
391+
}
392+
393+
@media (min-width: 768px) {
394+
[data-toc-popover] > header {
395+
inset-inline-start: var(--fd-sidebar-col, 0px) !important;
396+
}
397+
}
398+
385399
/* Fumadocs sidebar: edge-to-edge item rows with explicit horizontal padding */
386400
#nd-sidebar [data-radix-scroll-area-viewport],
387401
#nd-sidebar-mobile [data-radix-scroll-area-viewport] {

0 commit comments

Comments
 (0)