Skip to content

The app fills the visible viewport, not the layout one - #330

Merged
mattshax merged 1 commit into
mainfrom
mobile-viewport
Sep 8, 2026
Merged

The app fills the visible viewport, not the layout one#330
mattshax merged 1 commit into
mainfrom
mobile-viewport

Conversation

@mattshax

@mattshax mattshax commented Sep 8, 2026

Copy link
Copy Markdown
Member

On a phone the navigation bar floated above a band of background and the composer sat near the browser chrome. The dynamic-viewport fix was applied to .app alone, while html, body, #root were still height: 100% of the layout viewport, which on iOS is taller than the visible one: the app was laid out in a box bigger than the screen and the page itself scrolled.

Under the existing 760px breakpoint, every ancestor now uses 100dvh with overflow: hidden, so there is no page-level scroll and the bottom bar stays on the bottom edge; views scroll inside their own containers as before. The bar also gets padding-bottom: max(2px, env(safe-area-inset-bottom)) to clear the home indicator, which requires viewport-fit=cover on the viewport meta for the inset to report a real value. Browsers without dvh ignore the declarations and keep today's behavior. CSS and one meta tag.

On a phone the navigation bar floated above a band of background with
the composer pushed toward the browser chrome. The dynamic-viewport fix
was on .app alone, while html, body and #root were still 100% of the
layout viewport, which on iOS is taller than what is visible: the app
sat in a box bigger than the screen and the page itself scrolled. Every
ancestor now uses the visible viewport and refuses a page-level scroll,
so the bar stays on the bottom edge and the views scroll inside their
own containers. The bar also clears the home indicator, which needs
viewport-fit=cover for the inset to report a real value.
@mattshax
mattshax merged commit 1057c16 into main Sep 8, 2026
1 check passed
@mattshax
mattshax deleted the mobile-viewport branch September 8, 2026 03:23
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