Skip to content

Make mobile menu fill full viewport height#110

Merged
mre merged 1 commit into
masterfrom
fix-mobile-menu-height
Jun 7, 2026
Merged

Make mobile menu fill full viewport height#110
mre merged 1 commit into
masterfrom
fix-mobile-menu-height

Conversation

@mre

@mre mre commented Jun 7, 2026

Copy link
Copy Markdown
Member

Summary

The mobile navigation menu now always uses the full viewport height when open, instead of relying on large fixed padding per item.

Problem

  • Each menu item had padding: 2.4em top and bottom. With the current 7 items this made the open menu taller than a typical phone screen, causing overflow.

Change (sass/_base.scss, mobile @media (max-width: 950px) block)

  • When open, the menu spans 100dvh (#menu-toggle:checked ~ .menu), using dvh so it accounts for mobile browser chrome.
  • Items use flex: 1 1 0 so they grow to share the available height evenly. This means the menu always fills the screen exactly with no leftover gaps, regardless of how many items there are.
  • Links/CTA now center their content via flexbox and fill their row (height: 100%) instead of using fixed 2.4em padding.

Result

  • Fits any phone screen without overflow.
  • No empty gap at the top or bottom.
  • Scales automatically if menu items are added or removed.

On small screens the open menu now spans 100dvh and its items grow to share that space evenly via flex, so the menu always fills the screen with no oversized padding, overflow, or leftover gaps regardless of the number of items.
@mre mre merged commit b90767a into master Jun 7, 2026
2 of 3 checks passed
@mre mre deleted the fix-mobile-menu-height branch June 7, 2026 21:17
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