The complete reference
Every CSS unit,
explained.
From the everyday px and rem to the fine print ofsvh, dvh and cqi: all 63 of them, with live examples wherever seeing beats reading.
On your screen now
1rem = …1vw = …1vh = …1ch = …… displayUnit categories
63 units, grouped by what they measure against.
- 01Absolutepx · cm · mm · in · pt · pc · QFixed measurements that stay constant regardless of context. The foundation of CSS sizing.
- 02Font-relativeem · rem · ch · ex · cap · ic · lh · +5Units relative to font properties of the current or root element. The key to scalable typography.
- 03Percentage%Formally a value rather than a unit, and context-dependent: the property decides what it is a percentage of.
- 04Viewportvw · vh · svh · lvh · dvh · vmin · vmax · +17Units based on the browser viewport size — including the modern small, large, and dynamic variants.
- 05Containercqw · cqh · cqi · cqb · cqmin · cqmaxUnits relative to the nearest container query ancestor. The future of component-driven layouts.
- 06FlexiblefrThe Grid fractional unit — a share of leftover space rather than a fixed length. Unique among CSS units.
- 07Specialdeg · turn · rad · ms · s · dpi · +6Angles for transforms, durations for animations, and resolutions for media queries.