CKTIS / CSS
svmin — smaller small-viewport dimension
The CSS length unit svmin equals 1% of the smaller small-viewport dimension. It scales an element relative to width or height, assuming that dynamically retractable browser bars are expanded.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
<number>svminsvmin is a length unit: 1svmin = min(1svw, 1svh). Write the number immediately before the unit, for example 40svmin. Its reference is the viewport, not the parent element.
The small viewport assumes that dynamically retractable browser interfaces are expanded. The unit stays stable as those bars retract, but can change when the viewport is resized. It does not mean the smallest size recorded during a session.
svmin selects the smaller dimension; svmax selects the larger. vmin corresponds to lvmin, the large-viewport variant, whereas dvmin uses dynamic-viewport dimensions. The example creates a square with a side of 40svmin.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>svmin example</title>
<style>
body { margin: 0; }
.square {
width: 40svmin;
height: 40svmin;
background: royalblue;
}
</style>
<div class="square"></div>
</html>Result
A royalblue square whose side is 40% of the smaller small-viewport dimension. If the small viewport is 320 × 640 CSS pixels, the square measures 128 × 128 CSS pixels.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.