← notes

Heading typography in a long-form archive

Jan 5, 2020

Improve heading typography on the Satoshi index at the Nakamoto Institute.

Typography on an archive of long documents is more load-bearing than it sounds, because the index is where someone decides whether to commit half an hour to reading something.

The technical content is that a heading scale should be a ratio rather than hand-picked pixel values. Sizes from a consistent multiplier read as a system; sizes chosen individually read as a list of decisions, which is what they are. The other half is that line-height has to tighten as size increases, the value comfortable at body size is far too loose at display size, because perceived leading is proportional to the space between lines rather than to the font size.

Margin collapse around headings is the one producing the visible bug. The margin below a paragraph and above the following heading collapse to the larger rather than summing, so adjusting one frequently changes nothing and the fix looks like it did not apply.

For a dense index the goal is scannability, not beauty. The reader is looking for one entry among many.

text-wrap: balance handles two-line headings that break with an orphan, and degrades harmlessly where unsupported.