Skip to content

docs: fix API docs sidebar overscroll from topbar offset#49

Merged
rachaelrenk merged 1 commit intomainfrom
docs/migration-ff/api-sidebar
May 8, 2026
Merged

docs: fix API docs sidebar overscroll from topbar offset#49
rachaelrenk merged 1 commit intomainfrom
docs/migration-ff/api-sidebar

Conversation

@rachaelrenk
Copy link
Copy Markdown
Contributor

Summary

Fix the API docs sidebar overscroll caused by the WarpTopbar offset.

Problem

The /api page's Scalar sidebar appeared taller than needed and scrolled slightly at the top and bottom of the main scroll area. This happened because Scalar's --scalar-y-offset shifts the sidebar's top position below the WarpTopbar, but doesn't reduce the sidebar's total height. The sidebar was extending past the viewport bottom by exactly the topbar height (3.5rem on mobile, 4rem on desktop).

Fix

Added max-height: calc(100vh - var(--warp-topbar-height)) to the .sidebar class in the Scalar customCss block in src/pages/api.astro. This constrains the sidebar to the visible viewport area below the topbar, eliminating the overscroll.

Context

Part of the docs v2 bug bash follow-up work. Tracks to Notion item: Migration FF: API docs sidebar scrolling issue.

Co-Authored-By: Oz oz-agent@warp.dev

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 <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 8, 2026 10:54pm

Request Review

@rachaelrenk rachaelrenk self-assigned this May 8, 2026
@rachaelrenk rachaelrenk merged commit abe624e into main May 8, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants