CKTIS / CSS
lvmax — larger dimension of the large viewport
The lvmax unit is 1% of the larger dimension of the large viewport, calculated assuming retractable browser interfaces are retracted.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
<number>lvmaxlvmax is a length unit: 1lvmax equals 1% of the larger of the large viewport’s width and height. Write the number directly before the unit, such as 10lvmax; the parent’s size is not the reference.
The large viewport assumes dynamically expandable browser interfaces are retracted. The unit stays fixed until the viewport is resized; expanded interfaces can obscure content.
lvmin selects the smaller dimension. svmax uses the small viewport, whereas dvmax uses the dynamic viewport. In this specification, vmax corresponds to lvmax.
The example creates a square with sides of 10lvmax. For a large viewport of 1000 × 600 CSS pixels, the expected size is 100 × 100 CSS pixels, including when width and height are swapped.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>lvmax example</title>
<style>
html, body { margin: 0; overflow: hidden; }
.square {
width: 10lvmax;
height: 10lvmax;
background: teal;
}
</style>
<div class="square"></div>
</html>Result
For a large viewport of 1000 × 600 CSS px, the teal square measures 100 × 100 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.