Skip to content

Commit 64ceb50

Browse files
committed
Remove sidebar pill styling from shell-docs
1 parent ee6b2c3 commit 64ceb50

4 files changed

Lines changed: 11 additions & 54 deletions

File tree

showcase/shell-docs/src/app/globals.css

Lines changed: 5 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -362,24 +362,12 @@ figure.shiki > div:first-child[class*="border-b"] {
362362
}
363363
}
364364

365-
/* Sidebar — float as a card panel inset from all four viewport edges,
366-
* matching the canonical "DocsLayout sidebar in a card" treatment. The
367-
* fumadocs aside is `fixed; left: 0; top: var(--fd-sidebar-top);
368-
* bottom: var(--fd-sidebar-margin)` by default — we override `left` and
369-
* tighten top/bottom so the panel floats with even breathing room. */
365+
/* Sidebar — keep the navigation unframed at every viewport width. */
370366
.shell-docs-sidebar {
371-
/* In v16 the aside sits inside a sticky grid-area wrapper whose
372-
* horizontal position is already driven by `<main className="mx-3">`
373-
* — matching BrandNav's `px-3` (12px) so the sidebar pill's left
374-
* edge lines up with BrandNav's left card. The previous
375-
* `left: 0.75rem !important` was a v15-era leftover that added an
376-
* extra 12px inset on top of main's margin, breaking that column
377-
* alignment. */
378-
/* Tailwind's `border-[var(--border)]` arbitrary-value class loses to
379-
* the bare `border` utility's `currentColor` default in v4's cascade
380-
* order — leading to a near-black outline against the white panel.
381-
* Force the token explicitly. */
382-
border-color: var(--border) !important;
367+
background-color: transparent !important;
368+
border: 0 !important;
369+
border-radius: 0 !important;
370+
box-shadow: none !important;
383371
}
384372

385373
/* Sidebar scroll viewport — 1rem padding on all sides matches the
@@ -389,36 +377,6 @@ figure.shiki > div:first-child[class*="border-b"] {
389377
padding: 1rem !important;
390378
}
391379

392-
/* Banner width: in fumadocs v16 the aside applies
393-
* `*:w-(--fd-sidebar-width)` to every direct child, so the banner
394-
* already matches the nav links underneath (268px). The previous
395-
* `width: 100%` override forced it to fill the aside, which at wide
396-
* viewports made the framework-picker stretch beyond the rest of the
397-
* sidebar. Removing that override is intentional.
398-
*
399-
* Pill chrome (the rounded card around the sidebar):
400-
* • Below 2xl (≤1535px): keep the rounded card. Fumadocs's aside
401-
* fills the sticky grid-area wrapper (`inset-y-0`) which is
402-
* `100dvh - --fd-docs-row-1` tall. We leave this alone so the
403-
* internal scroll viewport stays bounded and the footer
404-
* (GitHub + Discord + theme toggle) pins to the bottom of the
405-
* visible pill instead of being pushed below the viewport.
406-
* • 2xl+ (≥1536px): drop the rounded/border/bg/shadow. At this
407-
* point the sidebar grid-area widens past `--fd-sidebar-width`
408-
* because the grid's outer 1fr columns gain horizontal space, so
409-
* the pill would frame empty whitespace. The nav items
410-
* (right-aligned via `items-end`) read better unframed. The
411-
* `2xl` Tailwind breakpoint (1536px) lines up with fumadocs's
412-
* `--fd-layout-width: 97rem` (1552px). */
413-
@media (min-width: 1536px) {
414-
.shell-docs-sidebar {
415-
background-color: transparent !important;
416-
border: 0 !important;
417-
border-radius: 0 !important;
418-
box-shadow: none !important;
419-
}
420-
}
421-
422380
/* Bridge shell-docs's hand-rolled token names (--bg, --text, --accent, …)
423381
* to the names Fumadocs's shadcn preset expects (--background, --foreground,
424382
* --primary, …). Done in @theme inline so Tailwind's color utilities

showcase/shell-docs/src/components/brand-nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function BrandNav(_props: BrandNavProps = {}) {
8181
{/* Cap the BrandNav's visible chrome at the same `--fd-layout-width`
8282
* (97rem) that the fumadocs docs grid uses, and center it. At
8383
* wide viewports this keeps the BrandNav's left/right edges
84-
* aligned with the sidebar pill on the left and the docs content
84+
* aligned with the sidebar column on the left and the docs content
8585
* column on the right; at narrower viewports it's a no-op
8686
* because the inner width never reaches the cap. */}
8787
<div className="flex justify-between items-center w-full h-full max-w-[97rem] mx-auto">

showcase/shell-docs/src/components/shell-docs-layout.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import DiscordIcon from "./icons/discord";
1111
// Shared Fumadocs `DocsLayout` chrome used by every shell-docs route.
1212
// All five callers (home overview, framework root, framework-scoped MDX
1313
// via DocsPageView, /reference, /ag-ui) pass the same nav/search/sidebar
14-
// config — only `tree` and `sidebar.banner` vary. Centralizing keeps the
15-
// sidebar surface, mobile nav slot, and container className from drifting
14+
// config — only `tree` and `sidebar.banner` vary. Centralizing keeps
15+
// sidebar behavior, mobile nav slot, and container className from drifting
1616
// across routes when one is tweaked.
1717
export function ShellDocsLayout({
1818
tree,
@@ -46,8 +46,7 @@ export function ShellDocsLayout({
4646
banner,
4747
// Hide Fumadocs's collapse toggle — shell-docs has its own chrome.
4848
collapsible: false,
49-
className:
50-
"rounded-2xl border border-[var(--border)] bg-[var(--bg-surface)] shadow-sm shell-docs-sidebar",
49+
className: "shell-docs-sidebar",
5150
// Note: `key` is required here because fumadocs's Sidebar
5251
// passes the `footer` ReactNode into a `jsxs(children: [a, b,
5352
// footer])` array, and React's dev-mode warning insists every

showcase/shell-docs/src/components/sidebar-framework-selector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ export function SidebarFrameworkSelector() {
4747

4848
return (
4949
// Sticky so the selector stays visible as the user scrolls long
50-
// sidebars. The wrapper bg matches the sidebar surface so the area
51-
// surrounding the pill reads as one continuous panel.
50+
// sidebars. The wrapper bg keeps nav text from showing through the
51+
// sticky header while the sidebar remains visually unframed.
5252
<div className="sticky top-0 z-10 bg-[var(--bg-surface)] backdrop-blur-lg">
5353
<FrameworkSelector
5454
options={options}

0 commit comments

Comments
 (0)