Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions landing/src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,33 @@ html:not([data-anchor-scrolling]) {
display: none;
}

/* Sticky positioning is broken inside the fumadocs grid. Use fixed instead. */
/* Sidebar: fixed positioning so it never scrolls with content, but only when expanded */
@media (min-width: 768px) {
[data-sidebar-placeholder] {
[data-sidebar-placeholder]:not(:has(#nd-sidebar[data-collapsed="true"])) {
position: fixed !important;
width: var(--fd-sidebar-width) !important;
inset-inline-start: max(0px, calc((100vw - var(--fd-layout-width, 97rem)) / 2)) !important;
}
}

@media (max-width: 767px) {
:root {
--subnav-height: 3.5rem;
}

#nd-subnav {
position: fixed !important;
top: var(--fd-docs-row-1, 0px) !important;
inset-inline-start: 0 !important;
inset-inline-end: 0 !important;
}

/* Compensate for fixed #nd-subnav leaving grid flow */
[data-toc-popover] {
margin-top: var(--subnav-height);
}
}

[data-toc-popover] > header {
position: fixed !important;
top: var(--fd-docs-row-2, 0px) !important;
Expand Down