From 97636a4c542b4f092536bcad255da10c0066c2e2 Mon Sep 17 00:00:00 2001 From: Charles Howard <96023061+charlesrhoward@users.noreply.github.com> Date: Thu, 23 Apr 2026 11:01:28 -0400 Subject: [PATCH] docs: make desktop sidebar width a true max --- src/app/global.css | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/app/global.css b/src/app/global.css index a6135d0..6a46b18 100644 --- a/src/app/global.css +++ b/src/app/global.css @@ -47,8 +47,19 @@ html > body[data-scroll-locked] { @media (min-width: 768px) { #nd-docs-layout { - /* Fumadocs switches from drawer to full sidebar at 768px; prefer the normal 270px width and only shrink slightly on the narrowest desktop viewports. */ - --fd-sidebar-width: min(270px, 35vw); + /* Fumadocs sets the sidebar track inline; override it so desktop can shrink to content up to 270px instead of reserving a fixed column. */ + --fd-sidebar-col: fit-content(270px) !important; + --fd-sidebar-width: 270px; + } + + #nd-docs-layout [data-sidebar-placeholder] { + --fd-sidebar-width: fit-content(270px); + max-inline-size: 270px; + } + + #nd-docs-layout #nd-sidebar { + inline-size: fit-content(270px); + max-inline-size: 270px; } /* Fumadocs still mounts the collapsed-panel shell on desktop; keep it hidden. */