Skip to content

Commit 2b08523

Browse files
tylerslatonclaude
andcommitted
fix(shell-docs): stack sidebar under banner instead of overlapping BrandNav
The DocsLayout sidebar uses `position: fixed` with hardcoded `top: 76px / 96px` overrides at md/xl. When the rotating banner is visible, body-flow `Banners` + `BrandNav` shift down (banner ~54px + BrandNav 68/88px), but the fixed sidebar stays pinned — so the "LangGraph (Python)" framework picker overlaps the BrandNav row. Wrap both top overrides in `calc(... + var(--fd-banner-height, 0px))` so the sidebar slides down by the banner's height when shown and snaps back when dismissed. `Banners` already writes that variable on `<html>` (54px / 0px), and `MobileTopNav` uses the same pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7bc0835 commit 2b08523

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,15 +292,20 @@ figure.shiki > div:first-child[class*="border-b"] {
292292
width: 100% !important;
293293
}
294294

295+
/* Top offset stacks BrandNav (68px md / 88px xl) under the banner (54px
296+
* when shown, 0px when dismissed — Banners writes the variable on <html>).
297+
* Without `--fd-banner-height` in the calc, the fixed sidebar pins to
298+
* 76/96px while body-flow chrome (Banner + BrandNav) shifts down past it,
299+
* overlapping the nav row. */
295300
@media (min-width: 768px) {
296301
.shell-docs-sidebar {
297-
top: 76px !important;
302+
top: calc(76px + var(--fd-banner-height, 0px)) !important;
298303
}
299304
}
300305

301306
@media (min-width: 1280px) {
302307
.shell-docs-sidebar {
303-
top: 96px !important;
308+
top: calc(96px + var(--fd-banner-height, 0px)) !important;
304309
}
305310
}
306311

0 commit comments

Comments
 (0)