Skip to content

fix: mobile nav polish — stable toggle position, menu closes on all navigation#100

Merged
kaiiiichen merged 1 commit into
mainfrom
fix/mobile-nav-toggle-shift
Jul 10, 2026
Merged

fix: mobile nav polish — stable toggle position, menu closes on all navigation#100
kaiiiichen merged 1 commit into
mainfrom
fix/mobile-nav-toggle-shift

Conversation

@kaiiiichen

@kaiiiichen kaiiiichen commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

Two mobile nav fixes:

  1. Theme toggle no longer shifts — the menu button's ☰/✕ glyphs have different widths, so the button box resized on toggle and pushed the right-aligned theme toggle sideways. The button is now a fixed size-8 square with the glyph centered. Measured at 375px viewport: theme toggle stays at x=287.01, menu button at x=317.41 across open/close cycles (0px shift).
  2. Menu closes when navigating via the site-name link — dropdown links already collapsed the menu, but tapping "Kai T. Chen" (top-left) navigated home with the menu left open. The brand link now closes it on click, and the menu also resets on any pathname change, so back/forward navigation collapses it too.

Test plan

  • npm run lint / npm run typecheck / npm run test (23) / npm run build
  • Browser-verified at mobile viewport: zero toggle shift; menu open on /about → tap brand → lands on / with menu collapsed (aria-expanded=false)

🤖 Generated with Claude Code

The hamburger glyphs ☰ and ✕ have different advance widths, so the
button box resized on toggle and pushed the right-aligned theme toggle
sideways. Give the menu button a fixed square box (size-8) with the
glyph centered; both controls now hold their position.

Co-authored-by: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kaichen.dev Ready Ready Preview, Comment Jul 10, 2026 8:03am

@kaiiiichen kaiiiichen merged commit 4d620bb into main Jul 10, 2026
4 checks passed
@kaiiiichen kaiiiichen changed the title fix: stop the mobile theme toggle shifting when the menu button flips fix: mobile nav polish — stable toggle position, menu closes on all navigation Jul 10, 2026
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