Skip to content

Commit 1e28849

Browse files
committed
fix(docs): preserve spacing above nested sidebar sections
1 parent ff61e23 commit 1e28849

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/docs/components/docs-layout/docs-sidebar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function SidebarScrollArea() {
5656
className={cn('min-h-0 flex-1 overflow-y-auto overscroll-contain', scrollFadeClass)}
5757
{...scrollFadeAttributes(edges)}
5858
>
59-
<div className='flex flex-col gap-px px-2 py-4 lg:pr-3.5 lg:pl-[calc(var(--nav-inset)-8px)]'>
59+
<div className='flex flex-col gap-px px-2 py-4 lg:pr-3.5 lg:pl-[calc(var(--nav-inset)-8px)] [&>[data-separator]:first-child]:mt-0'>
6060
<SidebarTree key={root.$id} nodes={root.children} />
6161
</div>
6262
</div>

‎apps/docs/components/docs-layout/sidebar-components.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export function SidebarFolder({ item, children }: SidebarFolderProps) {
121121

122122
export function SidebarSeparator({ item }: SidebarSeparatorProps) {
123123
return (
124-
<div data-separator className='mt-4 mb-1.5 px-2 first:mt-0'>
124+
<div data-separator className='mt-4 mb-1.5 px-2'>
125125
<p className='text-[var(--text-icon)] text-caption'>{item.name}</p>
126126
</div>
127127
)

0 commit comments

Comments
 (0)