CKTIS / CSS
dvmin — the smaller dynamic viewport dimension
The dvmin length unit represents 1% of the smaller dynamic viewport dimension. It accounts for browser interfaces expanding and retracting.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
<number>dvmindvmin is a CSS <length> unit. 1dvmin equals the smaller of 1dvw and 1dvh: 1% of the smaller dynamic viewport dimension. Write the number directly before the unit without a space, for example 50dvmin.
The dynamic viewport accounts for browser interfaces that expand and retract. Unlike svmin and lvmin, which use the small and large viewport respectively, dvmin can change during scrolling. vmin corresponds to lvmin, while dvmax selects the larger dynamic dimension.
In the example, both square dimensions are half the smaller dynamic viewport dimension. At 800 × 600 CSS pixels, this produces a 300 × 300 CSS-pixel square; swapping width and height leaves the result unchanged.
Interface changes can cause layout shifts. The browser need not update dynamic units smoothly throughout an interface animation. Nor is dvmin a guaranteed measure of space unobscured by an on-screen keyboard: interfaces that overlay content may leave these units unchanged.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>dvmin example</title>
<style>
html, body { margin: 0; }
.square {
width: 50dvmin;
height: 50dvmin;
background: royalblue;
}
</style>
<div class="square"></div>
</html>Result
Dynamic viewport 800 × 600 CSS px: a royalblue square measuring 300 × 300 CSS px.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.