CKTIS / CSS
svmax — the larger small-viewport dimension
The CSS length unit svmax equals 1% of the larger small-viewport dimension. It uses the viewport size with dynamically retractable browser interface elements expanded.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
<number>svmaxsvmax is a length unit: 1svmax = max(1svw, 1svh). Write the number directly before the unit, for example 10svmax. Its reference is not the parent element’s size.
The “small” viewport assumes that dynamically retractable browser interface elements are expanded. The unit stays stable as those elements retract, but can change when the viewport is resized, for example after device rotation.
svmin selects the smaller dimension; svmax selects the larger one. lvmax uses the large viewport, whereas dvmax uses the dynamic viewport. Consequently, a width of 100svmax can exceed the viewport width in portrait orientation.
The example creates a teal square. For a small viewport of 800 × 600 CSS pixels, its expected size is 80 × 80 CSS pixels; swapping the viewport dimensions produces the same result.
Examples
<!doctype html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>svmax</title>
<style>
html, body { margin: 0; }
.box {
width: 10svmax;
height: 10svmax;
background: teal;
}
</style>
<div class="box"></div>Result
Small viewport 800 × 600 CSS px: a teal square, 80 × 80 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.