docs: fix API docs sidebar overscroll from topbar offset#49
Merged
rachaelrenk merged 1 commit intomainfrom May 8, 2026
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
hongyi-chen
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the API docs sidebar overscroll caused by the WarpTopbar offset.
Problem
The
/apipage'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-offsetshifts the sidebar'stopposition 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.sidebarclass in the ScalarcustomCssblock insrc/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