Prefer dvh
100vh is the viewport with the browser toolbars hidden. While they show, a full-height screen is taller than what you see, and its bottom is cut off.
12345{ "rules": { "systomic/prefer-dvh": "warn" }}See the difference
className="h-screen"className="h-dvh"What doesn't work
Oxlint
2 findings12345678export function Page() { return ( <> <main className="h-screen" /> <aside style={{ minHeight: "100vh" }} /> </> );}systomic/prefer-dvh h-screen is taller than the visible area on mobile. Consider h-dvh.
systomic/prefer-dvh 100vh is taller than the visible area on mobile. Consider 100dvh.
Stylelint
1 finding123.page { min-height: 100vh;}systomic/prefer-dvh 100vh is taller than the visible area on mobile. Consider 100dvh.
What works
No findingsOxlint
12345678export function Page() { return ( <> <main className="h-dvh" /> <aside style={{ minHeight: "100dvh" }} /> </> );}Stylelint
123.page { min-height: 100dvh;}Details
100vh is the height of the viewport with the mobile browser toolbars hidden. With the toolbars visible, a 100vh element is taller than the visible area and its bottom is cut off. dvh follows the toolbars.
12<main className="min-h-screen" /> // consider min-h-dvh<main style={{ height: "100vh" }} /> // consider 100dvhReported:
- Tailwind:
h-screen,min-h-screen,max-h-screen(with any variant). - Inline styles / StyleX:
100vhinheight,minHeight,maxHeight,blockSize,minBlockSize,maxBlockSize, also insidecalc()and StyleX conditional values.
It’s a suggestion: dvh changes size while the toolbars show and hide, which isn’t always wanted (full-screen backgrounds, for example). So there is no autofix, only an editor quick-fix.
Stylelint
For .css / .scss files (see Stylelint): 100vh in heights and @apply h-screen. Severity warning, no autofix.
See Styling for how classes, inline styles, StyleX and stylesheets are read.