$ the-wire · showcase
VitePress reserves navbar title space only when a sidebar exists
By RepoJournal · Filed · About Vue.js · Composed from the cited sources · methodology
VitePress now reserves the navbar title column only on pages that actually have a sidebar, restoring compact title-to-search spacing on 404 and sidebar-free pages.
At desktop widths, pages configured with `sidebar: false` and 404 pages were still reserving a sidebar-sized title column in the navbar, which pushed the search button away from the title even when no sidebar was rendered [1]. The theme applied the title's minimum width unconditionally; it now applies that minimum width only when `.has-sidebar` is present, alongside the existing maximum width, so sidebar alignment is unchanged while sidebar-free pages get the compact layout back [1][2].
The change adds coverage for home, sidebar-free, 404, and sidebar pages [2], including a browser regression test comparing title-to-search spacing, so the conditional behavior is exercised across the four page types rather than asserted statically [1].
No public API, config key, or version number changed: this is a scoped theme style fix. If your docs site sets `sidebar: false` on any page, the layout change lands with the next VitePress release.
Action items
References
- [1] fix(theme): avoid sidebar spacing without a sidebar ↗ vuejs/vitepress
- [2] fix(theme): avoid sidebar spacing without a sidebar ↗ vuejs/vitepress