Skip to content

Commit 2840f8e

Browse files
fix(layout): pin sidebar left and stabilize width across viewports (#22)
Replace the fit-content(270px) grid track override that collapsed the sidebar to min-content at 1440 and below, and grow --fd-layout-width so Fumadocs' outer 1fr gutters don't center the frame on ultra-wide monitors. Content article keeps its own max-w-[900px] mx-auto cap. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent abfd060 commit 2840f8e

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

‎src/app/global.css‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,9 @@ html > body[data-scroll-locked] {
4747

4848
@media (min-width: 768px) {
4949
#nd-docs-layout {
50-
/* Fumadocs sets the sidebar track inline; override it so desktop can shrink to content up to 270px instead of reserving a fixed column. */
51-
--fd-sidebar-col: fit-content(270px) !important;
5250
--fd-sidebar-width: 270px;
53-
}
54-
55-
#nd-docs-layout [data-sidebar-placeholder] {
56-
--fd-sidebar-width: fit-content(270px);
57-
max-inline-size: 270px;
58-
}
59-
60-
#nd-docs-layout #nd-sidebar {
61-
inline-size: fit-content(270px);
62-
max-inline-size: 270px;
51+
/* Grow the main track past 97rem so the outer 1fr gutters collapse at ultra-wide viewports; the article inside is still capped at max-w-[900px] mx-auto. */
52+
--fd-layout-width: 200rem;
6353
}
6454

6555
/* Fumadocs still mounts the collapsed-panel shell on desktop; keep it hidden. */

0 commit comments

Comments
 (0)