Testing

Viewport Unit Variants: Browser Support, dvh, svh, lvh

Viewport unit variants (svh, lvh, dvh and family) work in Chrome 108+, Edge 108+, Firefox 101+, Safari 15.4+, Opera 94+, and Samsung Internet 21+.

Author

Prince Dewani

May 2, 2026

Viewport unit variants are CSS length units from CSS Values Level 4 that size elements to the small (sv*), large (lv*), or dynamic (dv*) viewport. They work in Chrome 108, Edge 108, Firefox 101, Safari 15.4, Opera 94, Samsung Internet 21, and Firefox for Android 150, while Internet Explorer and KaiOS Browser do not support them.

This guide covers what viewport unit variants are, the browsers that support them, the small, large, and dynamic units, use cases, and known issues.

What are viewport unit variants?

Viewport unit variants are CSS length units defined in the CSS Values and Units Module Level 4 that size an element relative to the small, large, or dynamic viewport. The sv*, lv*, and dv* prefixes target each viewport size across the height (vh), width (vw), inline (vi), block (vb), min, and max axes.

Which browsers support viewport unit variants?

Every modern engine supports viewport unit variants on desktop and mobile, and global support sits at 94.26% based on caniuse usage data.

Loading browser compatibility data...

Viewport unit variants compatibility in Chrome

Chrome supports viewport unit variants from Chrome 108 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 100 to 107 had the units behind the chrome://flags Experimental Web Platform features toggle, and Chrome 4 to 99 did not support them at all.

Viewport unit variants compatibility in Edge

Edge supports viewport unit variants from Edge 108 on Windows, macOS, Linux, and Android. Edge 105 to 107 had the units disabled by default behind a flag, and EdgeHTML-based Edge 12 to 18 never supported them.

Viewport unit variants compatibility in Firefox

Firefox supports viewport unit variants from Firefox 101 on Windows, macOS, and Linux. Firefox for Android shipped the same units in Firefox 150, so the desktop and Android tracks are now aligned. Firefox 100 and earlier do not parse the sv, lv, or dv prefixes and treat the property as invalid.

Viewport unit variants compatibility in Safari on macOS

Safari supports viewport unit variants from Safari 15.4 on macOS Big Sur, Monterey, Ventura, Sonoma, and Sequoia. WebKit was the first major engine to ship sv, lv, and dv units, and Safari 15.4 and later expose them with no flag.

Viewport unit variants compatibility in Safari on iOS and iPadOS

Safari on iOS and iPadOS supports viewport unit variants from iOS 15.4 on iPhone and iPad. Apple's WebKit-only rule means every iOS browser inherits the same implementation, so dvh, svh, and lvh behave consistently across the iOS browser fleet running iOS 15.4 or later.

Viewport unit variants compatibility in Opera

Opera supports viewport unit variants from Opera 94 on Windows, macOS, Linux, and Android. Opera 91 to 93 had the units disabled by default behind a flag, matching the underlying Blink rollout. Opera Mobile 80 and Opera Mini both ship the units on Android.

Viewport unit variants compatibility in Samsung Internet

Samsung Internet supports viewport unit variants from Samsung Internet 21 on Galaxy phones running Android. Samsung Internet 20 and earlier do not parse the sv, lv, or dv prefixes, so One UI shells stuck on an older Samsung Internet build fall back to vh and vw.

Viewport unit variants compatibility in Android Browser

The legacy stock Android Browser supports viewport unit variants from Android Browser 147. Chrome for Android 108 and later, the modern Android WebView, Samsung Internet 21, and Firefox for Android 150 also support the units, so the API is consistent across the modern Android browser stack.

Viewport unit variants compatibility in Internet Explorer

Internet Explorer 5.5 to 11 do not support viewport unit variants. The Trident engine never shipped sv, lv, or dv prefixes, and the property is dropped from the cascade. Microsoft has retired Internet Explorer, so move pages with dvh, svh, or lvh dependencies to Chromium-based Edge.

Note

Note: Viewport unit variants behave differently across mobile toolbars, iOS Safari, and older Samsung Internet builds. Test them on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the small, large, and dynamic viewport units?

CSS Values Level 4 splits the viewport into three sizes, and each size has its own unit prefix. The small viewport assumes every collapsible browser bar is shown, the large viewport assumes every bar is hidden, and the dynamic viewport flips between the two as the bars slide.

  • Small viewport (sv*): svw, svh, svi, svb, svmin, and svmax size against the smallest viewport, the one with the address bar and tab strip out. The values are stable, so an svh element never resizes mid-scroll, but the element may leave a strip of empty space when the bars retract.
  • Large viewport (lv*): lvw, lvh, lvi, lvb, lvmin, and lvmax size against the largest viewport, the one with every bar hidden. lvh equals the legacy 100vh, and an lvh element fills the screen edge to edge once the user starts scrolling.
  • Dynamic viewport (dv*): dvw, dvh, dvi, dvb, dvmin, and dvmax size against the live viewport and update as the toolbars expand or retract. A 100dvh element flips between the small and large heights, so it always matches the visible area, at the cost of a layout shift mid-scroll.
  • Logical inline and block axes: vi maps to the inline axis and vb maps to the block axis. Under writing-mode: horizontal-tb, vi equals vw and vb equals vh. Under writing-mode: vertical-rl or vertical-lr, vi and vb swap, so a CJK or Arabic layout reads the same intent as a Latin one.

What are the use cases of viewport unit variants?

Viewport unit variants close the long-standing gap where 100vh on a phone overflowed the visible area when the address bar was shown. Production apps lean on them for hero sections, mobile chat UIs, fullscreen modals, photo viewers, and embedded video pages.

  • Full-bleed hero sections: Marketing pages set min-height: 100dvh on the hero so the call-to-action stays visible whether the address bar is shown or hidden. Vercel, Linear, and Framer landing pages use the dvh fallback pattern in production.
  • Mobile chat and messaging UIs: Slack, WhatsApp Web, and Signal pin the message composer to the bottom with height: 100dvh on the chat shell, so the composer never sits under the iOS Safari bottom bar when it slides in.
  • Fullscreen modals and photo viewers: Image gallery libraries set the lightbox to height: 100lvh so the photo locks to the full screen and ignores the toolbar state, even if the user scrolls behind the modal.
  • Embedded video and stream players: YouTube, Twitch, and Loom embeds use 100dvh on the video shell when the player goes fullscreen, so the playback area expands and contracts with the toolbar without a black gap.
  • Logical-axis layouts for RTL and CJK: News sites publishing in Arabic, Hebrew, Japanese, and Chinese set inline-size: 100dvi on the article column, so the column tracks the writing direction without a writing-mode-specific override.
...

What are the known issues with viewport unit variants?

Viewport unit variants are well supported, so the rough edges show up in fallback strategy, layout shifts, and engine-specific quirks rather than total browser gaps.

  • dvh causes layout shift on scroll: A 100dvh element resizes every time the address bar retracts or expands. Pages that wrap dvh elements in scroll-snap or sticky layouts trip over Cumulative Layout Shift in Lighthouse and lose Core Web Vitals score.
  • Older browser fallback is mandatory: Chrome before 108, Firefox before 101, Safari before 15.4, and every Internet Explorer build drop a dvh declaration. Pair every dvh, svh, or lvh value with a vh fallback in a separate declaration above so the cascade picks the supported one.
  • iOS Safari toolbar quirks: iOS Safari only collapses the bottom bar after the user scrolls down, so 100lvh is not actually reachable on first paint. A hero set to 100lvh shows a white strip until the first scroll gesture.
  • Samsung Internet stuck on old builds: Samsung phones on Android 11 and earlier sometimes ship Samsung Internet 19 or 20, which do not parse the sv, lv, or dv prefixes. The page falls back to vh, and a 100dvh hero overflows under the navigation bar.
  • Mobile keyboard does not change dvh: The on-screen keyboard on Android Chrome and iOS Safari does not move the dynamic viewport. A 100dvh chat shell sits under the keyboard unless the page also reads visualViewport.height in JavaScript.

In my experience, the trap that bites every viewport-unit migration once is the dvh layout shift on iOS Safari. A hero looks perfect on the desktop preview, then the QA team flags a 12-pixel jump when the user scrolls into the address bar. Wrap the hero with min-height: 100svh and flip to 100dvh past the fold to remove the jump.

...

Citations

All viewport unit variants version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests