Menu

dvh Is Not a Keyboard Fix: Picking the Right Viewport Tool on Mobile
πŸ“°

dvh Is Not a Keyboard Fix: Picking the Right Viewport Tool on Mobile

DEV Community: cssΒ·Kyoko OtonashiΒ·3 days ago
#wQpBFaMJ
#devtocss#devto#dev#keyboard#viewport
Reading 0:00
15s threshold

100dvh fixed the old 100vh address-bar problem, and a lot of us quietly started treating it as "the mobile viewport fix." It isn't. It fixes one of the things that make a mobile web app's layout jump around. The on-screen keyboard is a different problem, and on iOS Safari dvh doesn't react to it at all.

This post is a decision table: which tool handles which mobile layout problem, and where it's easy to reach for the wrong one.

Four problems that look like one

When a full-height mobile layout breaks, it's usually one of these:

Browser chrome β€” the address bar and toolbar expand and collapse as you scroll.

The soft keyboard β€” it slides up and covers the bottom part of the screen.

Safe areas β€” the notch, the rounded corners, the home indicator.

Overlays that must stay reachable β€” bottom sheets, sticky toolbars, "Send" buttons.

They all show up as "my bottom bar is in the wrong place," so it's tempting to throw one fix at all of them.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.