What problem does it solve?
Mobile web layouts often suffer from the 100vh problem, where the visible area changes as the browser chrome (address bar, toolbars) appears or disappears, causing content to be clipped or misaligned in app-like shells. This Skill provides a protocol for building resilient layouts that adapt to svh, dvh, and lvh and hardware safe areas using env(safe-area-inset-*) and a proper viewport meta tag.
Core Features & Use Cases
- Robust height handling with 100dvh, 100svh, and 100lvh to ensure full-screen shells across scroll states.
- Safe area integration using env(safe-area-inset-*) to prevent UI from being cut by notches or home indicators.
- Viewport configuration with viewport-fit=cover and calc-based padding to maintain background continuity and content safety.
- Use cases include app-like shells, full-height sections, sticky bottom controls above the home indicator, and overlays that avoid notches in landscape.
Quick Start
Create an app-shell layout that uses 100dvh for height, applies safe-area padding with env(safe-area-inset-*) values, and sets the viewport meta tag to viewport-fit=cover.