Published 2026-03-05 · 1 min read
Why Developers Prefer REM Units (And When to Break the Rule)
REM gives predictable scaling against the root, fewer surprises in component trees than EM, and cleaner communication with design tokens.
Predictability
REM always references the root. That makes token math portable across pages and prevents surprise compounding when a parent’s font-size changes.
Use REM ↔ EM when you straddle both mental models in a legacy stylesheet.
Legitimate px exceptions
1px hairlines, precise borders on high-DPI displays, and occasionally iconography still lean on px. The goal is intentional px, not accidental px because Figma exports only absolute numbers.
When stakeholders speak px, translate with REM to PX while keeping production CSS in REM.
Frequently asked questions
- Is EM ever better?
- Yes—local typographic rhythm (padding relative to a heading’s font-size) can be clearer in EM. Just document the cascade carefully.