Tech News
← Home  ·  All topics

Ch Unit

1 GoKawiil brief on this topic

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.