Blogger swaps CSS pixels for ch and ex units to size text-based layouts
A web developer describes replacing pixel-based CSS measurements with the ch unit (roughly a character's width) and the ex unit (the height of a lowercase letter) on a text-heavy blog. The goal is to size content width, padding, and margins in proportion to the text itself, using an approach like max-width: min(75ch, 100%) for readable line lengths.
GoKawiil's interpretation of the reporting above, not reported fact.
Pixels are not the fixed, absolute units many assume—they scale differently across devices and don't map cleanly to physical measurements, which complicates consistent design. Using relative typographic units like ch and ex ties layout directly to text readability rather than arbitrary screen dimensions, a subtle but meaningful shift for accessible, device-agnostic web design.
- CSS pixels are perceptual, not fixed physical units, and vary across device pixel densities.
- The ch unit sizes layout based on character width, useful for controlling readable line lengths in text-heavy pages.
- The experiment is partial and pragmatic—px remains valid, and the switch is a design choice, not a universal rule.
Source: shkspr.mobi — Terence Eden, 2026-08-23
Published there as: “Death to px, long live ch”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.