Responsive layout
responsive/dynamic-viewport-units
A full-height layout uses 100dvh (or svh) instead of 100vh, which is taller than the visible area on mobile.
minorstaticfe-responsive
Why
On mobile browsers 100vh equals the viewport with the address bar hidden, so a full-height hero or a sticky footer is cut off or jumps when the bar shows.
Fix
Use min-height: 100dvh (follows the visible area) or 100svh (the smallest, stable value). Keep a 100vh line before it only if you support browsers without the new units. With Tailwind, use min-h-dvh or min-h-svh instead of min-h-screen.
Examples
/* bad */
.hero { min-height: 100vh; }
/* good */
.hero { min-height: 100svh; }Sources
Facts
- Id
responsive/dynamic-viewport-units- Severity
- minor
- Check
- static checked in the source by
audit - Applies to
cssscsslesshtmlvuesvelteastrojsxangular- Taught by the skill
fe-responsiveResponsive design- Since version
- 0.1.0
Read it in the terminal
npx github:dawidolko/frontend-skills explain responsive/dynamic-viewport-units