svb
One percent of the small viewport, measured across the stack of lines.
Safe to useBaseline: widely available
| Browser | Since |
|---|---|
| Chrome | 108+ |
| Chrome Android | 108+ |
| Edge | 108+ |
| Firefox | 101+ |
| Firefox Android | 101+ |
| Safari | 15.4+ |
| Safari iOS | 15.4+ |
Formula 1svb = 1/100 of the small viewport in the block direction
How it works
1svb is the small viewport measured along the block axis, which is the height for horizontal text, so svb and svh agree there. A block-size of 100svb is as long as the small viewport in the direction lines stack: the height on a horizontal page, the width on a vertical one, with one declaration for both. In a vertical document in a window 1280px wide it measured 1280px.
It keeps the promise of svh: a block of exactly 100svb is never larger than the visible area, in any writing mode. The strip problem of svh comes with it: once the toolbars retract, a bare strip shows under the block, so match the section’s background to the page.
Try it
Viewport units for a window of your choice
Enter a window size, or take the one you have. Ten of each unit comes out as a tenth of the width, the height, the shorter side or the longer one.
10vw- 128px
10vh- 80px
10vmin- 80px
10vmax- 128px
On a desktop window svh, lvh and dvh give the same numbers as vh. They differ only while a phone browser shows or hides its toolbars, which this page cannot show.
The same as a table
| Unit | Laptop, 1280 by 800 | Phone, 390 by 844 |
|---|---|---|
10vw | 128px | 39px |
10vh | 80px | 84.4px |
10vmin | 80px | 39px |
10vmax | 128px | 84.4px |
What changes it
- Moves with
- the window size
- the writing mode
- Stays put under
- the reader's text size
- page zoom
- the font in use
- the query container
- phone toolbars
Reach for it when
A block that never exceeds the visible area, in any writing mode.
Watch out
In horizontal text svb equals svh and has its limits: once the toolbars retract, 100svb no longer fills the screen.
html {
writing-mode: vertical-rl;
}
.shelf {
block-size: 100svb;
}