@@ -96,54 +96,58 @@ aside#nd-sidebar {
9696 border-right : none !important ;
9797}
9898
99- /* Responsive sidebar positioning */
100- /* Mobile: Fumadocs handles drawer */
101- @media (min-width : 768px ) and (max-width : 1024px ) {
102- aside [data-sidebar ],
103- aside # nd-sidebar {
104- left : var (--sidebar-offset ) !important ;
105- }
99+ /* Fumadocs v16: Add sidebar placeholder styling for grid area */
100+ [data-sidebar-placeholder ] {
101+ background : transparent !important ;
106102}
107103
108- /* Desktop layout alignment */
109- @media (min-width : 1025px ) {
110- [data-sidebar-container ] {
111- margin-left : var (--sidebar-offset ) !important ;
104+ /* Fumadocs v16: Hide sidebar panel (floating collapse button) */
105+ [data-sidebar-panel ] {
106+ display : none !important ;
107+ }
108+
109+ /* Mobile only: Reduce gap between navbar and content */
110+ @media (max-width : 1023px ) {
111+ # nd-docs-layout {
112+ margin-top : -25px ;
112113 }
113- aside [data-sidebar ],
114- aside # nd-sidebar {
115- left : var (--sidebar-offset ) !important ;
114+ }
115+
116+ /* Desktop only: Apply custom navbar offset, sidebar width and margin offsets */
117+ /* On mobile, let fumadocs handle the layout natively */
118+ @media (min-width : 1024px ) {
119+ : root {
120+ --fd-banner-height : 64px !important ;
116121 }
117- /* TOC positioning - target all possible selectors */
118- [data-toc ],
119- aside [data-toc ],
120- div [data-toc ],
121- .fd-toc ,
122- # nd-toc ,
123- nav [data-toc ],
124- aside : has ([role = "complementary" ]) {
125- right : var (--toc-offset ) !important ;
122+
123+ # nd-docs-layout {
124+ --fd-docs-height : calc (100dvh - 64px ) !important ;
125+ --fd-sidebar-width : 300px !important ;
126+ margin-left : var (--sidebar-offset ) !important ;
127+ margin-right : var (--toc-offset ) !important ;
126128 }
127129
128- /* Alternative TOC container targeting */
129- [data-docs-page ] > aside : last-child ,
130- main ~ aside {
131- right : var (--toc-offset ) !important ;
130+ /* Hide fumadocs nav on desktop - we use custom navbar there */
131+ # nd-docs-layout > header {
132+ display : none !important ;
132133 }
133134}
134135
135136/* Sidebar spacing - compact like turborepo */
136- [data-sidebar-viewport ] {
137- padding : 0.5rem 20px 12px ;
137+ /* Fumadocs v16: [data-sidebar-viewport] doesn't exist, target #nd-sidebar > div instead */
138+ [data-sidebar-viewport ],
139+ # nd-sidebar > div {
140+ padding : 0.5rem 12px 12px ;
138141 background : transparent !important ;
139142 background-color : transparent !important ;
140143}
141144
142145/* Override sidebar item styling to match Raindrop */
143146/* Target Link and button elements in sidebar - override Fumadocs itemVariants */
144147/* Exclude the small chevron-only toggle buttons */
145- # nd-sidebar a ,
146- # nd-sidebar button : not ([aria-label *= "ollapse" ]): not ([aria-label *= "xpand" ]) {
148+ /* Using html prefix for higher specificity over Tailwind v4 utilities */
149+ html # nd-sidebar a ,
150+ html # nd-sidebar button : not ([aria-label *= "ollapse" ]): not ([aria-label *= "xpand" ]) {
147151 font-size : 0.9375rem !important ; /* 15px to match Raindrop */
148152 line-height : 1.4 !important ;
149153 padding : 0.5rem 0.75rem !important ; /* More compact like Raindrop */
@@ -154,14 +158,14 @@ aside#nd-sidebar {
154158}
155159
156160/* Dark mode sidebar text */
157- .dark # nd-sidebar a ,
158- .dark # nd-sidebar button : not ([aria-label *= "ollapse" ]): not ([aria-label *= "xpand" ]) {
161+ html .dark # nd-sidebar a ,
162+ html .dark # nd-sidebar button : not ([aria-label *= "ollapse" ]): not ([aria-label *= "xpand" ]) {
159163 color : rgba (255 , 255 , 255 , 0.6 ) !important ;
160164}
161165
162166/* Light mode sidebar text */
163- : root : not (.dark ) # nd-sidebar a ,
164- : root : not (.dark ) # nd-sidebar button : not ([aria-label *= "ollapse" ]): not ([aria-label *= "xpand" ]) {
167+ html : not (.dark ) # nd-sidebar a ,
168+ html : not (.dark ) # nd-sidebar button : not ([aria-label *= "ollapse" ]): not ([aria-label *= "xpand" ]) {
165169 color : rgba (0 , 0 , 0 , 0.6 ) !important ;
166170}
167171
@@ -194,7 +198,10 @@ aside#nd-sidebar {
194198}
195199
196200/* Section headers should be slightly larger */
197- [data-sidebar-viewport ] [data-separator ] {
201+ /* Fumadocs v16: Also target #nd-sidebar for compatibility */
202+ [data-sidebar-viewport ] [data-separator ],
203+ # nd-sidebar [data-separator ],
204+ # nd-sidebar p {
198205 font-size : 0.75rem !important ;
199206 font-weight : 600 !important ;
200207 text-transform : uppercase !important ;
@@ -218,61 +225,61 @@ aside#nd-sidebar {
218225}
219226
220227/* Dark mode active state */
221- .dark # nd-sidebar a [data-active = "true" ],
222- .dark # nd-sidebar button [data-active = "true" ],
223- .dark # nd-sidebar a .bg-fd-primary\/ 10,
224- .dark # nd-sidebar a .text-fd-primary ,
225- .dark # nd-sidebar a [class *= "bg-fd-primary" ],
226- .dark # nd-sidebar a [class *= "text-fd-primary" ],
227- .dark # nd-sidebar a .bg-purple-50\/ 80,
228- .dark # nd-sidebar a .text-purple-600 ,
229- .dark # nd-sidebar a [class *= "bg-purple" ],
230- .dark # nd-sidebar a [class *= "text-purple" ] {
228+ html .dark # nd-sidebar a [data-active = "true" ],
229+ html .dark # nd-sidebar button [data-active = "true" ],
230+ html .dark # nd-sidebar a .bg-fd-primary\/ 10,
231+ html .dark # nd-sidebar a .text-fd-primary ,
232+ html .dark # nd-sidebar a [class *= "bg-fd-primary" ],
233+ html .dark # nd-sidebar a [class *= "text-fd-primary" ],
234+ html .dark # nd-sidebar a .bg-purple-50\/ 80,
235+ html .dark # nd-sidebar a .text-purple-600 ,
236+ html .dark # nd-sidebar a [class *= "bg-purple" ],
237+ html .dark # nd-sidebar a [class *= "text-purple" ] {
231238 background-color : rgba (255 , 255 , 255 , 0.15 ) !important ;
232239 color : rgba (255 , 255 , 255 , 1 ) !important ;
233240}
234241
235242/* Light mode active state */
236- : root : not (.dark ) # nd-sidebar a [data-active = "true" ],
237- : root : not (.dark ) # nd-sidebar button [data-active = "true" ],
238- : root : not (.dark ) # nd-sidebar a .bg-fd-primary\/ 10,
239- : root : not (.dark ) # nd-sidebar a .text-fd-primary ,
240- : root : not (.dark ) # nd-sidebar a [class *= "bg-fd-primary" ],
241- : root : not (.dark ) # nd-sidebar a [class *= "text-fd-primary" ],
242- : root : not (.dark ) # nd-sidebar a .bg-purple-50\/ 80,
243- : root : not (.dark ) # nd-sidebar a .text-purple-600 ,
244- : root : not (.dark ) # nd-sidebar a [class *= "bg-purple" ],
245- : root : not (.dark ) # nd-sidebar a [class *= "text-purple" ] {
243+ html : not (.dark ) # nd-sidebar a [data-active = "true" ],
244+ html : not (.dark ) # nd-sidebar button [data-active = "true" ],
245+ html : not (.dark ) # nd-sidebar a .bg-fd-primary\/ 10,
246+ html : not (.dark ) # nd-sidebar a .text-fd-primary ,
247+ html : not (.dark ) # nd-sidebar a [class *= "bg-fd-primary" ],
248+ html : not (.dark ) # nd-sidebar a [class *= "text-fd-primary" ],
249+ html : not (.dark ) # nd-sidebar a .bg-purple-50\/ 80,
250+ html : not (.dark ) # nd-sidebar a .text-purple-600 ,
251+ html : not (.dark ) # nd-sidebar a [class *= "bg-purple" ],
252+ html : not (.dark ) # nd-sidebar a [class *= "text-purple" ] {
246253 background-color : rgba (0 , 0 , 0 , 0.07 ) !important ;
247254 color : rgba (0 , 0 , 0 , 0.9 ) !important ;
248255}
249256
250257/* Dark mode hover state */
251- .dark # nd-sidebar a : hover : not ([data-active = "true" ]),
252- .dark # nd-sidebar button : hover : not ([data-active = "true" ]) {
258+ html .dark # nd-sidebar a : hover : not ([data-active = "true" ]),
259+ html .dark # nd-sidebar button : hover : not ([data-active = "true" ]) {
253260 background-color : rgba (255 , 255 , 255 , 0.08 ) !important ;
254261}
255262
256263/* Light mode hover state */
257- : root : not (.dark ) # nd-sidebar a : hover : not ([data-active = "true" ]),
258- : root : not (.dark ) # nd-sidebar button : hover : not ([data-active = "true" ]) {
264+ html : not (.dark ) # nd-sidebar a : hover : not ([data-active = "true" ]),
265+ html : not (.dark ) # nd-sidebar button : hover : not ([data-active = "true" ]) {
259266 background-color : rgba (0 , 0 , 0 , 0.03 ) !important ;
260267}
261268
262269/* Dark mode - ensure active/selected items don't change on hover */
263- .dark # nd-sidebar a .bg-purple-50\/ 80: hover,
264- .dark # nd-sidebar a [class *= "bg-purple" ]: hover ,
265- .dark # nd-sidebar a [data-active = "true" ]: hover ,
266- .dark # nd-sidebar button [data-active = "true" ]: hover {
270+ html .dark # nd-sidebar a .bg-purple-50\/ 80: hover,
271+ html .dark # nd-sidebar a [class *= "bg-purple" ]: hover ,
272+ html .dark # nd-sidebar a [data-active = "true" ]: hover ,
273+ html .dark # nd-sidebar button [data-active = "true" ]: hover {
267274 background-color : rgba (255 , 255 , 255 , 0.15 ) !important ;
268275 color : rgba (255 , 255 , 255 , 1 ) !important ;
269276}
270277
271278/* Light mode - ensure active/selected items don't change on hover */
272- : root : not (.dark ) # nd-sidebar a .bg-purple-50\/ 80: hover,
273- : root : not (.dark ) # nd-sidebar a [class *= "bg-purple" ]: hover ,
274- : root : not (.dark ) # nd-sidebar a [data-active = "true" ]: hover ,
275- : root : not (.dark ) # nd-sidebar button [data-active = "true" ]: hover {
279+ html : not (.dark ) # nd-sidebar a .bg-purple-50\/ 80: hover,
280+ html : not (.dark ) # nd-sidebar a [class *= "bg-purple" ]: hover ,
281+ html : not (.dark ) # nd-sidebar a [data-active = "true" ]: hover ,
282+ html : not (.dark ) # nd-sidebar button [data-active = "true" ]: hover {
276283 background-color : rgba (0 , 0 , 0 , 0.07 ) !important ;
277284 color : rgba (0 , 0 , 0 , 0.9 ) !important ;
278285}
@@ -351,7 +358,16 @@ aside[data-sidebar] > *:not([data-sidebar-viewport]) {
351358 [data-sidebar ] [data-title ],
352359 # nd-sidebar > a : first-child ,
353360 # nd-sidebar > div : first-child > a : first-child ,
354- # nd-sidebar img [alt = "Sim" ] {
361+ # nd-sidebar img [alt = "Sim" ],
362+ /* Hide theme toggle at bottom of sidebar on desktop */
363+ # nd-sidebar
364+ > footer ,
365+ # nd-sidebar footer ,
366+ aside # nd-sidebar > * : last-child : not (div ),
367+ # nd-sidebar > button : last-child ,
368+ # nd-sidebar button [aria-label *= "theme" i],
369+ # nd-sidebar button [aria-label *= "Theme" ],
370+ # nd-sidebar > div : last-child > button {
355371 display : none !important ;
356372 visibility : hidden !important ;
357373 height : 0 !important ;
@@ -498,13 +514,14 @@ main article,
498514 ============================================ */
499515
500516/* Main content area - center and constrain like turborepo/raindrop */
517+ /* Note: --sidebar-offset and --toc-offset are now applied at #nd-docs-layout level */
501518main [data-main ] {
502519 max-width : var (--spacing-fd-container , 1400px );
503520 margin-left : auto;
504521 margin-right : auto;
505522 padding-top : 1rem ;
506- padding-left : calc ( var (--sidebar-offset ) + var ( -- content-gap) );
507- padding-right : calc ( var (--toc-offset ) + var ( -- content-gap) );
523+ padding-left : var (--content-gap );
524+ padding-right : var (--content-gap );
508525 order : 1 !important ;
509526}
510527
0 commit comments