Line height by context

Tight for headings, relaxed for body, and looser as lines widen.

From refactoring-ui, after Refactoring UI by Adam Wathan and Steve Schoger.

Headings and body differ

Drag both sliders or pick a preset.

One value everywhereBad

Revenue grew faster this quarter than in any year since we started tracking it

Subscription revenue carried most of the growth, while services held flat. Churn fell for the third quarter in a row, and the new annual plan now accounts for a third of bookings. Cash on hand covers twenty months of spend at the current burn.

h1, p { line-height: 1.5 }
By contextGood

Revenue grew faster this quarter than in any year since we started tracking it

Subscription revenue carried most of the growth, while services held flat. Churn fell for the third quarter in a row, and the new annual plan now accounts for a third of bookings. Cash on hand covers twenty months of spend at the current burn.

h1 { line-height: 1.10 } p { line-height: 1.75 }
h1, h2 { line-height: 1.1; }
p      { line-height: 1.75; }
.label { line-height: 1.5; }

Wider lines, more leading

Widen the column, then read across one line.

Fixed 1.5Bad

Most readers never finish a long line on the first try. The eye jumps along a line in short hops, then makes one long sweep back to the left edge to find the start of the next line. On a narrow column that sweep is short and easy to aim. On a wide one it crosses most of the screen, and a small error drops the reader onto the line below or back onto the line they just read. Extra space between lines gives that sweep a larger target, which is why line height has to grow as the measure grows.

line-height: 1.5
Scales with widthGood

Most readers never finish a long line on the first try. The eye jumps along a line in short hops, then makes one long sweep back to the left edge to find the start of the next line. On a narrow column that sweep is short and easy to aim. On a wide one it crosses most of the screen, and a small error drops the reader onto the line below or back onto the line they just read. Extra space between lines gives that sweep a larger target, which is why line height has to grow as the measure grows.

line-height: 1.78
.prose {
  --measure: 65;
  max-width: calc(var(--measure) * 1ch);
  line-height: clamp(1.5, 1.275 + var(--measure) * 0.005, 1.85);
}

“Text is hard to read”

Apply one fix at a time.

0 of 3 fixesHard to read

Before closing the month, reconcile every bank and card account against its statement, then review uncategorized transactions and any entries posted after the last close. Accruals for payroll, rent and software should be booked before revenue is recognized, so that the income statement reflects the period and not the date cash moved.

Once the balance sheet ties to supporting schedules, lock the period. Changes after the lock should go through an adjusting entry with a note, never through an edit to the original transaction.

line-height: 1.15; max-width: none; color: 45% ink;
.prose { max-width: 65ch; line-height: 1.75; color: var(--ink); }

Why it matters, pros and cons

Why it matters

Big heading lines already have room, so extra leading splits the phrase. Long body lines need space to find the next line.

Pros

  • Headings read as one unit.
  • Long text is easier to follow.
  • Three tokens cover most text styles.

Cons

  • At 1.0, some fonts clip descenders and accents.
  • Line height cannot save a 120ch line.
  • Dense UI wastes rows at 1.75.