CKTIS / CSS
svh — small viewport height unit
The svh unit equals 1% of the small viewport height, calculated assuming that retractable browser interface elements are expanded.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
<number>svhsvh is a length unit: 1svh means 1% of the small viewport height. Write the number directly before the unit, for example height: 50svh. The reference height assumes that expandable and retractable browser interface elements are expanded.
Unlike dvh, svh stays stable while those elements retract, unless the viewport itself changes size. vh equals lvh, which uses the large viewport. After the interface retracts, an element with height: 100svh may leave spare space below it. svh does not guarantee protection against overlays such as an on-screen keyboard.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>svh example</title>
<style>
body { margin: 0; }
.panel {
height: 50svh;
background: lightblue;
}
</style>
<div class="panel">50svh</div>
</html>Result
A light-blue panel with a height equal to half the small viewport height. If that reference height is 800 CSS px, the panel height is 400 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.