Skip to content

Articles

The First Scroll Shouldn't Be the Game

Mobile browser chrome can push a game's lowest controls out of view at launch, and choosing the right viewport unit is how developers keep the first press where the player expects it.

A hand holding a phone with a game on screen. The browser address bar is still showing at the top, and the bottom row of round game controls is cut off at the lower edge, just out of the thumb's reach.
At launch, check whether the lowest on-screen control remains visible while the browser address bar is still expanded.

Thumb on the glass. A game opens, the address bar is still there, and the bottom row of controls sits just out of reach. Scroll once, the browser chrome retreats, and the layout seems to fix itself. That first, awkward frame is often a viewport-sizing problem, not a bad tap.

A hand holding a phone with a game on screen. The browser address bar is still showing at the top, and the bottom row of round game controls is cut off at the lower edge, just out of the thumb's reach.
At launch, check whether the lowest on-screen control remains visible while the browser address bar is still expanded.

Why 100vh Breaks on Mobile

The familiar 100vh asks for a height equal to the viewport, but mobile browsers have two relevant states: the page area with browser controls showing, and the larger area available after those controls retract. In modern browsers, vh effectively corresponds to the large viewport unit, lvh. So a 100vh panel can be taller than the space currently visible when the address bar is expanded.

The web.dev explanation notes that vw and vh do not change as mobile browser UI appears or disappears. The panel does not politely shrink to match the opening view. It may extend below the visible area, leaving a control row or a piece of the game canvas out of sight. Then the player scrolls, the address bar slides away, and the same panel appears to fit. A quiet layout shift has become part of the first minute of play.

Picture the launch sequence: “Start.” A thumb presses the screen. “Where’s jump?” The lower button is there, just beyond the visible edge. On an arcade page, that can mean the first interaction is a scroll instead of a move. The issue is easy to miss on a desktop monitor, where the three viewport sizes are identical in the absence of browser chrome that changes state.

The Three Viewport States

CSS now offers three viewport-unit families for this difference. The large units, including lvh and lvw, use the viewport with browser UI retracted. The small units, such as svh and svw, use the viewport with browser UI expanded. The dynamic units, including dvh and dvw, track the active state as the browser interface changes.

There are also min, max, inline, and block forms. For example, svmin and lvmax describe the smaller or larger viewport dimension, while dvi and dvb refer to the dynamic inline and block dimensions. Most game layouts will not need every variation. The important first decision is simpler: should this piece of the page fit the opening view, fill the maximum area, or adapt as the browser changes?

That choice is about input feel as much as geometry. A layout that jumps in height while someone is lining up a press can feel less stable than one that leaves a narrow strip unused. A canvas designed to occupy the entire available screen after the browser bar disappears has a different job from a control panel that must be reachable before the first scroll.

Choosing Between svh, lvh, and dvh

Use svh when the first frame must fit with browser controls visible. A declaration such as min-height: 100svh gives the section the height of the small viewport, the conservative size for that state. It is a practical choice for an opening screen or a control area where “visible now” matters more than filling every pixel later.

Use lvh when the goal is to occupy the largest available view, as with an immersive game surface or app shell after browser chrome retracts. The tradeoff is that the lower edge may extend beyond the visible opening area while that chrome is still present. If essential buttons live at that edge, the design needs to account for the smaller state rather than assuming the player has already scrolled.

Use dvh when the layout should respond to browser UI changes. It tracks the active viewport, so a panel can adjust as the address bar retreats or returns. That movement can be appropriate, but it should be checked during play. A resizing canvas or shifting control row may be more disruptive than a stable layout with some spare space.

Dynamic viewport units do not account for a virtual keyboard. That matters for input-heavy screens with text fields or controls near the bottom. A keyboard can change what the player can see without the viewport-unit choice alone guaranteeing that every button remains available. Keep a fallback for older browsers too. A developer can declare a vh-based height first, then provide a newer unit in a later declaration, so browsers that do not recognize the newer syntax still have a usable rule.

Testing Controls on Real Devices

Run the opening sequence on a phone, not just in a desktop preview. Load the page with the address bar visible. Before scrolling, look at the lowest control and try to reach it. Then scroll enough for the browser UI to retract and watch what changes. Repeat as the bar returns. The key question is not only whether the whole game fits, but whether the next intended input remains possible at each point.

A short session log helps make the result concrete: address bar expanded, bottom control visible; after scroll, panel height changed or stayed put; address bar returned, control still reachable or clipped. Check which unit the layout uses, and whether there is a fallback. If a field opens the virtual keyboard, test that state separately. Dynamic units alone are not a promise that keyboard-related controls will stay accessible.

The available references explain the unit behavior, but they do not document how GamesUnlimited’s hosted games size their controls. They also do not establish browser-specific behavior on iOS or Android, or how a fullscreen API call interacts with these units. Those details need direct device testing before anyone can make a site-wide claim. The CSS Values and Units Level 4 document is a W3C Working Draft, dated 12 March 2024, and may be updated or replaced. For the core distinction, see OpenReplay’s guide to dynamic viewport units and web.dev’s viewport-unit explanation.

At the next launch, watch the lower edge before you touch anything. Does the first control stay put when the address bar disappears, or does the player have to chase it?

Sources

Darius Kline

He is a house writer for GamesUnlimited. He covers co-op campaigns, controller design, and player rituals through reports from launch nights and living rooms.

More articles

The First Scroll Shouldn't Be the Game | GamesUnlimited