Sub topic 7
Longer lines need more leading
This chapter covers why the measure (line length) and the leading (line spacing) have to be chosen together. It assumes you know what a measure and leading are, and that you can read basic CSS, including rem, ch, and line-height. Earlier chapters gave the usual ranges for each one on its own. Here the two are combined.
The core idea
Reading a paragraph involves two eye movements. Along a line, the eye makes small jumps (saccades) from word to word. At the end of a line, it sweeps back to the left edge and must land on the correct next line.
The return sweep is where measure and leading meet. The longer the line, the farther the eye travels, and the less precisely it lands. If the lines are packed tightly, a slightly inaccurate landing puts the eye on the wrong line, or on the line it just read. This is called doubling, and it breaks the reader's rhythm.
More space between lines makes each line a clearer target and gives the eye a visible channel to follow back. So when the measure grows, leading should grow with it. When the measure shrinks, leading can shrink.
The same effect from the other side
The relationship works in both directions.
- A long measure with tight leading is the worst case. The sweep is long and the targets are crowded.
- A short measure with very generous leading is also a problem, but a different one. The sweeps are short, so the extra space is not needed. The text breaks into disconnected strips and loses the feel of a paragraph.
- A short measure with modest leading works well. Short sweeps are easy, and the lines stay visually connected.
The practical rule is that leading is not a fixed number for a typeface. It is a number for a typeface at a given measure.
Typical values
Take a body text size of 16px (1rem) in an ordinary text typeface. These pairings are common starting points. They are guidelines to adjust by eye, not rules.
| Measure (characters per line) | Line-height ratio | Line height at 16px |
|---|---|---|
| 35 to 45 (narrow caption or column) | 1.3 to 1.4 | 20.8px to 22.4px |
| 50 to 65 (comfortable body text) | 1.4 to 1.5 | 22.4px to 24px |
| 66 to 75 (wide but still acceptable) | 1.5 to 1.6 | 24px to 25.6px |
| Above 75 | 1.6 or more, and shortening the line is usually better | 25.6px or more |
The last row matters. Past a certain point, adding leading only treats a symptom. A line of 100 characters is hard to read even with generous spacing, and the better fix is to reduce the measure.
Notice that the whole range of useful leading is narrow. Moving from a 40-character line to a 75-character line changes the ratio by roughly 0.2. The adjustments are small, and they are meant to be small. If you are changing leading by 0.5 or more to fix a measure problem, something else is wrong.
Applying it in CSS
A unitless line-height is the right tool. It is multiplied by each element's own font size, so a heading and a paragraph each get proportional spacing without extra rules. The measure is set with max-width in ch units. One ch is the width of the "0" glyph in the element's font, so it approximates a character count.
This is the baseline from the spine, a default that suits most body text:
body {
font-size: 1rem;
line-height: 1.5;
}
p {
max-width: 65ch;
}Now let the measure and leading move together. A wide article column gets a little more leading, and a narrow caption gets a little less:
body {
line-height: 1.5;
}
.article p {
max-width: 70ch;
line-height: 1.6;
}
.caption {
max-width: 45ch;
line-height: 1.4;
}The three values form a pattern: 45ch with 1.4, 65ch with 1.5 (inherited from body), and 70ch with 1.6. As the measure grows, the ratio grows.
Linking the two with a custom property
If you want the relationship to stay consistent as you change the measure, you can derive leading from the measure. This is optional, and a plain pair of values is often clearer. Still, calc() shows the idea.
:root {
--measure: 65;
}
p {
max-width: calc(var(--measure) * 1ch);
line-height: calc(1.4 + (var(--measure) - 45) * 0.005);
}With --measure: 45, the line-height is 1.4. With 65, it is 1.5. With 75, it is 1.55. The slope of 0.005 per character is a tuning value that matches the table above. Change it if your typeface needs more or less.
A unitless result from calc() is valid for line-height, because calc(1.4 + (65 - 45) * 0.005) reduces to a plain number.
Common mistakes
- Setting leading once and forgetting the container. A paragraph tuned at 60 characters per line can end up at 95 characters inside a full-width layout, with no change to its leading. Always check the real measure on the real page.
- Using a fixed unit for line-height. A value like
line-height: 24pxis inherited as 24px by every child. A heading with a 40px font would then get 24px leading and its lines would overlap. Use a unitless number. - Compensating for a long measure with leading alone. Raising line-height from 1.5 to 1.9 on a 110-character line makes the paragraph look airy, but the eye still has a long sweep. Narrow the column.
- Over-spacing narrow text. Applying 1.7 to a 35-character sidebar makes it look like a stack of separate lines.
- Forgetting that the measure changes with the viewport. On a phone, the measure may fall to 30 characters with no CSS change at all. That is usually fine, but make sure the leading has not been set so high for desktop that it looks loose on mobile.
When the typeface changes the answer
Leading depends on the typeface as well as the measure. A face with a large x-height (tall lowercase letters), a wide set width, or heavy strokes fills more of each line box, so it needs more leading. A face with a small x-height and light strokes needs less. The next chapter covers this. For now, treat the table above as a baseline for a typical text face and expect to nudge it by 0.05 to 0.1 for an unusual one.
A worked example
Suppose you have a blog layout. The article column is 720px wide, and the font is 18px. At that size, one ch is about 10px, so the column holds roughly 72 characters.
- The measure is about 72 characters, which is on the wide side of comfortable.
- The table suggests a ratio of 1.5 to 1.6. Pick 1.6.
- Line height is 18 × 1.6 = 28.8px.
- A caption in the same layout is set at 14px in a 300px box, about 40 characters. The table suggests 1.3 to 1.4. Pick 1.4.
- The caption line height is 14 × 1.4 = 19.6px.
.article p {
font-size: 1.125rem;
max-width: 72ch;
line-height: 1.6;
}
.caption {
font-size: 0.875rem;
max-width: 40ch;
line-height: 1.4;
}Both choices come from the same reasoning, and both land at different values because the measures differ.
How to check it
You do not need a measuring tool. Read a full paragraph at normal speed and watch for these signs.
- If you lose your place at the start of lines, or re-read a line, the leading is too tight for that measure. Add 0.05 to 0.1 and look again.
- If the paragraph looks like separate stripes and your eye does not carry from one line to the next, the leading is too loose. Reduce it.
- If neither problem shows but the lines feel exhausting, the measure is probably too long. Reduce
max-widthbefore touching leading again.
Make one change at a time. Changing both at once makes it hard to tell which one helped.
Summary
- A longer line means a longer return sweep and a harder landing, so it needs more leading.
- A shorter line can take less leading.
- Useful leading stays within a narrow band, roughly 1.3 to 1.6 for body text, so adjustments are small.
- If a very long line needs very large leading, shorten the line instead.
- In CSS, use a unitless
line-heightand amax-widthinch, and adjust them together.
Exercise
A paragraph is set at 16px with line-height: 1.5. The container is widened so the paragraph now runs about 90 characters per line. Readers say they keep losing their place at the start of lines. Name two changes you could make in CSS, and say which one you would try first and why.
Show answer
The two changes are to reduce the measure (for example max-width: 65ch) and to increase line-height (for example from 1.5 to 1.6). Try the measure first. At 90 characters the line is beyond the comfortable range, and extra leading only treats the symptom. Narrowing the line fixes the long return sweep directly, and the existing 1.5 leading will probably be fine once the measure is back near 65 characters.
Exercise
Why is line-height: 24px a poor choice on body, compared with line-height: 1.5?
Show answer
A fixed length is inherited as that exact value by every descendant. A heading with a 40px font size would receive 24px line-height, and its wrapped lines would overlap. A unitless number is inherited as a ratio and multiplied by each element's own font size, so every element gets proportional spacing.
Exercise
A caption is 14px and about 40 characters wide. A body paragraph is 18px and about 72 characters wide. Using the ranges in this chapter, choose a line-height for each and calculate the resulting line heights in pixels.
Show answer
Caption: about 1.4, giving 14 × 1.4 = 19.6px. Body paragraph: about 1.6, giving 18 × 1.6 = 28.8px. The body text gets the larger ratio because its measure is longer.