Skip to content

CANON-041: fix nav bottom-sheet safe-area-inset-bottom + 60dvh#47

Open
VaultSparkStudios wants to merge 1 commit into
mainfrom
routine/canon-041-nav-sheet-safe-area
Open

CANON-041: fix nav bottom-sheet safe-area-inset-bottom + 60dvh#47
VaultSparkStudios wants to merge 1 commit into
mainfrom
routine/canon-041-nav-sheet-safe-area

Conversation

@VaultSparkStudios

Copy link
Copy Markdown
Owner

What

The mobile nav bottom-sheet (nav-sheet.js, active for ~50% of mobile users via the canary split) was missing env(safe-area-inset-bottom) in its bottom padding. On iPhone X and later models (essentially all modern iPhones), the 34 px home-indicator zone overlaps the bottom of the sheet — hiding the Sign In, Membership, and Join The Vault CTA buttons and the last theme pills when the sheet is scrolled to the end.

Two changes to the single injected CSS rule for .vs-nav-sheet (line 117 of assets/nav-sheet.js):

  1. Safe-area insetpadding-bottom: 1.4remcalc(1.4rem + env(safe-area-inset-bottom, 0px))
    Mirrors the fix already present in the main drawer: calc(2rem + env(safe-area-inset-bottom, 0px)) in style.css.

  2. Dynamic viewport heightmax-height: 60vhmax-height: 60vh; max-height: 60dvh
    Progressive enhancement: browsers that don't understand dvh keep 60vh; modern mobile browsers use 60dvh so the sheet height tracks the visual viewport (excluding browser chrome) rather than the layout viewport.

How to verify on mobile

  1. Open the site on an iPhone (iPhone X or newer) in Safari — either in the 50% canary cohort naturally, or force it with ?nav=sheet in the URL.
  2. Tap the hamburger to open the bottom sheet.
  3. Scroll the sheet to the bottom.
  4. Before fix: "Sign In" and "Join The Vault" buttons are clipped/hidden under the home indicator bar.
    After fix: all CTA buttons are fully visible above the home indicator.
  5. Verify the sheet still slides open/closed smoothly and drag-to-close still works.

CANON-041 checklist

  • Mobile nav menu/drawer taller than the screen scrolls within itself (overflow: auto was already present)
  • env(safe-area-inset-*) honored — fixed here
  • 100dvh used where needed — fixed here (60dvh with 60vh fallback)
  • ≥44 px tap targets (all sheet buttons/links already meet this)
  • Body-scroll released on close (closeSheet() does not lock body scroll — the sheet uses its own overflow: auto container)
  • prefers-reduced-motion respected (the global *, *::before, *::after rule in style.css sets transition-duration: 0.01ms !important — covers the sheet's injected transitions)

Generated by Claude Code

The mobile nav bottom sheet (active for ~50% of mobile users via canary)
was missing env(safe-area-inset-bottom) in its padding-bottom. On iPhone X
and later, the 34px home indicator could overlap the Sign In / Join CTA
buttons and theme pills at the sheet's bottom edge.

Also adds max-height:60dvh (with 60vh fallback) so the sheet height tracks
the dynamic viewport on mobile browsers rather than the layout viewport.

The main drawer (nav-toggle.js) already handles safe-area-inset-bottom
correctly via calc(2rem + env(safe-area-inset-bottom, 0px)); this aligns
the sheet to the same standard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TNvDiURcGMFRqh8z5ZLrFa
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.

2 participants