fix(theme): keep search beside the title without a nav menu

The nav menu is the bar's only growing element, so without `nav`
configured everything packed to the right edge. Search now carries an
auto right margin. A present menu's flex-grow still wins, so nothing
moves in that case.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/5390/merge
Divyansh Singh 2 weeks ago
parent ebbd48c8c7
commit 14f4f09d32

@ -227,6 +227,15 @@ const overflow = provideNavOverflow({
height: var(--vp-nav-height); height: var(--vp-nav-height);
} }
@media (min-width: 48rem) {
/* keeps search on the title's side when there is no nav menu to grow
into the middle; with a menu present its flex-grow wins and this
margin resolves to zero */
.content-body > .search {
margin-right: auto;
}
}
/* collapsed into the `` menu kept mounted (hidden, out of the a11y tree /* collapsed into the `` menu kept mounted (hidden, out of the a11y tree
and tab order) so its natural width stays measurable */ and tab order) so its natural width stays measurable */
.content-body > .collapsed { .content-body > .collapsed {

Loading…
Cancel
Save