Skip to content

Commit d0e8fe4

Browse files
gkorlandCopilot
andauthored
fix(nav): keep aux nav links single-line on narrow mobile widths (#519)
Code review of #518 found that on narrow viewports (e.g. ~280px, the Galaxy Z Fold cover screen) or with a longer/additional aux_links entry, the aux nav button text wraps to a second line. That grows #main-header taller than the padding-top reserved on .site-nav, so the fixed search box ends up overlapping the first nav item's click target by a few pixels. Force aux nav links to stay on a single line and scroll horizontally instead, using the theme's own existing overflow-x: auto, so #main-header's height (and the matching reserved padding-top) stays constant regardless of viewport width or aux_links content. Verified via headless Chromium at 280/320/375px widths and with a stress-tested 4th, longer aux link: no overlap in any case. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent bc29699 commit d0e8fe4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

_includes/head_custom.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@
4242
.site-nav.nav-open {
4343
padding-top: 7.5rem;
4444
}
45+
46+
/* Keep aux nav links on a single line (scrolling horizontally via the
47+
theme's existing overflow-x: auto) instead of wrapping. Otherwise
48+
#main-header grows taller on narrow screens or with more aux_links,
49+
and the padding-top reserved above would no longer match its height. */
50+
.aux-nav .site-button {
51+
white-space: nowrap;
52+
}
4553
}
4654
</style>
4755

0 commit comments

Comments
 (0)