Modern CSS Units: REM, Viewport & Fluid Type
A practical map of the units that matter in modern frontends: REM, viewport sizing, dynamic viewport units (dvh), container queries, and clamp() for fluid typography.
Convert PX to REM, generate clamp() fluid type, check WCAG contrast, map Tailwind spacing, and solve viewport math — all in one tab. No signup, no server calls, instant copy-paste results.
Popular calculators
PX↔REM, viewport units, EM math, and more — every tool at a stable /tools/slug URL you can bookmark and share.
Convert pixels to REM instantly. Formula: px ÷ root font-size (default 16px) = r…
→Convert REM to pixels. Formula: rem × root font-size = px. Set any base size and…
→Convert pixels to EM relative to an element's font-size. Understand EM vs REM sc…
→Convert EM to pixels with a configurable element font-size. Match DevTools compu…
→Convert REM to EM using root font-size and element font-size. Bridge global toke…
→Convert CSS percentage lengths to pixels when you know the containing block's wi…
→Convert pixels to viewport-width units (vw) for fluid layouts. Set your design v…
→Convert viewport-width units (vw) to pixels for any viewport size. Useful for re…
→Convert vh (viewport height) units to pixels for any viewport. Handles the mobil…
→Fluid typography, breakpoints, WCAG contrast, and Tailwind helpers — the full catalog lives on /tools.
A practical map of the units that matter in modern frontends: REM, viewport sizing, dynamic viewport units (dvh), container queries, and clamp() for fluid typography.
Layer defaults, progressive enhancement, and fluid tokens so small screens stay fast while large screens earn refinements—not the other way around.
Translate design tokens into Tailwind-friendly thinking: spacing keys, arbitrary values vs scale, REM alignment, and when to bail out to CSS variables.