Repository navigation
fix(theme): collapse header nav to hamburger below 1200px - #574
Closed
inference-gateway-maintainer[bot] wants to merge 1 commit into
Closed
inference-gateway-maintainer[bot] wants to merge 1 commit into
inference-gateway-maintainer[bot] wants to merge 1 commit into
Conversation
inference-gateway-maintainer
Bot
requested a review
from a team
as a code owner
August 17, 2026 20:49
Contributor
|
🗑️ Preview environment destroyed. |
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.
Problem
The default VitePress theme swaps the hamburger for the horizontal nav menu at
768px. That default assumes a short nav; ours has six groups (Getting Started,Guides, Reference, Protocols, Agents, Skills).
Measured against the theme's own layout rules, the horizontal menu needs roughly:
272pxtitle/sidebar column (--vp-sidebar-width, absolute at >= 960px)~590pxof nav labels (6 groups, 14px text,0 12pxpadding, plus caret)~160pxfor the search box + its32pxleft padding~40pxextra menu +32pxright paddingThat is ~1130-1180px before anything is crowded. Between 768px and that point,
.content-bodyis a non-wrapping flex row with noflex-shrinkcontrol on themenu, so the nav links get squeezed - labels like "Getting Started" wrap onto
two lines inside the 64px bar and collide with the search box. Tablets, split
screens and small laptop windows all land in that range.
Fix
CSS only, in the existing theme override file - no new component, no JS. Keep
the mobile nav screen (which already lists the exact same links, plus appearance
and social links) until there is room for the horizontal menu:
.VPNavBarMenuand.VPNavBarExtrabelow 1200px.VPNavBarHamburgerand allow.VPNavScreenbelow 1200px!importantis used to beat the theme's scoped component styles. Above 1200pxnothing changes.
Notes
is commented as such and should be re-measured if nav items are added or
renamed.
closeScreenOnTabletWindowcloses the nav screen on any resize at >= 768px,so between 768px and 1200px an open menu closes if the window is resized. The
hamburger stays visible, so it can just be reopened; fixing it would mean
shadowing the theme's
VPNavcomponent.Validation
bun run buildpasses; the rule is present in the built stylesheet.bunx prettier --checkandbun run lint:mdpass.not installed and installing it was blocked), so the breakpoint is derived
from the theme's layout CSS rather than from a screenshot. Worth a quick
visual check at ~800px, ~1000px and ~1300px on the preview deploy.