From 441f01222acd5ef33885bdd8d8155ccf3769f92f Mon Sep 17 00:00:00 2001 From: Rachael Rose Renk <91027132+rachaelrenk@users.noreply.github.com> Date: Fri, 8 May 2026 12:52:45 -1000 Subject: [PATCH] docs: fix API docs sidebar overscroll from topbar offset Scalar's --scalar-y-offset shifts the sidebar's top position below the WarpTopbar, but doesn't reduce the sidebar's total height. This caused the sidebar to extend past the viewport bottom by exactly the topbar height (3.5rem mobile / 4rem desktop), producing a slight overscroll at the top and bottom of the main scroll area. Fix: add max-height: calc(100vh - var(--warp-topbar-height)) to the .sidebar class in the Scalar customCss block. Co-Authored-By: Oz --- src/pages/api.astro | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pages/api.astro b/src/pages/api.astro index 86fad91d..84c4d00c 100644 --- a/src/pages/api.astro +++ b/src/pages/api.astro @@ -292,6 +292,14 @@ const specJson = JSON.stringify(specObject); --scalar-sidebar-item-active-background: #fafafa; --scalar-sidebar-item-hover-background: #fafafa; } + /* Fix sidebar height: Scalar's --scalar-y-offset shifts the + sidebar's top position below the topbar, but doesn't reduce + the sidebar's total height. Without this, the sidebar extends + past the viewport bottom by the topbar height, causing a + slight overscroll at the top and bottom. */ + .sidebar { + max-height: calc(100vh - var(--warp-topbar-height)) !important; + } /* Hide Developer Tools toolbar */ .references-developer-tools, .api-reference-toolbar { display: none !important; }