Skip to content

fix(nav): keep aux nav links single-line on narrow mobile widths#519

Open
gkorland wants to merge 1 commit into
mainfrom
fix/aux-nav-nowrap-mobile
Open

fix(nav): keep aux nav links single-line on narrow mobile widths#519
gkorland wants to merge 1 commit into
mainfrom
fix/aux-nav-nowrap-mobile

Conversation

@gkorland

@gkorland gkorland commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #518 (already merged). Code review of that PR found a narrow-viewport edge case in the mobile search-box positioning fix: the padding-top reserved above the nav list assumes a fixed height for the pinned search box + aux nav row, but that height wasn't actually fixed.

Changes

  • On narrow viewports (e.g. ~280px, Galaxy Z Fold cover screen) or with a longer/additional aux_links entry, the aux nav button text wraps to a second line, growing #main-header taller than the reserved padding-top. This caused the pinned search box to overlap the first nav item's click target by a few pixels.
  • Force aux nav links to stay single-line via white-space: nowrap, relying on the theme's own existing overflow-x: auto for horizontal scrolling instead of wrapping. This keeps #main-header's height constant regardless of viewport width or aux_links content.

Testing

Verified with headless Chromium (Playwright) at 280px, 320px, and 375px widths, using the real _config.yml aux_links (3 entries) and a stress test with a 4th, longer aux link appended — no overlap in any case after the fix. Desktop layout (>= 50rem) is untouched.

Memory / Performance Impact

N/A — CSS-only change, no measurable perf impact.

Related Issues

Follow-up to #518.

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>
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@gkorland, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 26 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6ecf1d8c-ae6f-4397-8371-f41a0cec3b1d

📥 Commits

Reviewing files that changed from the base of the PR and between 872ff56 and eff5cf9.

📒 Files selected for processing (1)
  • _includes/head_custom.html
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/aux-nav-nowrap-mobile

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant