systomic

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.

  • SuggestionIn suggestions.json: good practice. It only ever warns.
  • WarningShows in the editor and in CI output, but doesn't fail the run (unless you pass --deny-warnings).
  • StylelintThe same check runs on .css and .scss files through the Stylelint plugin.
  • Quick-fixYour editor offers a one-click fix. oxlint --fix leaves it to you.

See the difference

Before
100vhWelcomeContinue
systomic.dev
className="h-screen"
After
100dvhWelcomeContinue
systomic.dev
className="h-dvh"

What doesn't work

Oxlint

2 findings

Stylelint

1 finding

What works

No findings

Oxlint

Stylelint

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.

Reported:

  • Tailwind: h-screen, min-h-screen, max-h-screen (with any variant).
  • Inline styles / StyleX: 100vh in height, minHeight, maxHeight, blockSize, minBlockSize, maxBlockSize, also inside calc() 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.

Esc