Design readability

From Intense-Visions/harness-engineering · View interactive version

Design readability is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > Optimizing for reading — line length (measure), line height (leading), paragraph spacing, text alignment, hyphenation, and reading patterns (F-pattern, Z-pattern)

How to use this skill

Skill file

Readability

Optimizing for reading — line length (measure), line height (leading), paragraph spacing, text alignment, hyphenation, and reading patterns (F-pattern, Z-pattern)

When to Use

Instructions

  1. Set line length (measure) to 45-75 characters per line. This is the single most impactful readability setting. The research is unambiguous: lines shorter than 45 characters cause excessive line breaks and choppy reading; lines longer than 75 characters cause the eye to lose its place when returning to the left margin.

Concrete values for common body sizes:

| Font Size | Font | Ideal Max-Width | ~Characters |

|-----------|------|----------------|-------------|

| 16px | Inter | 640-680px | 65-70 |

| 16px | Georgia | 600-640px | 62-67 |

| 18px | system-ui | 700-740px | 63-68 |

| 21px | Georgia | 780-820px | 60-65 |

Decision procedure: Set max-width on your text container. Paste a paragraph of real content. Count characters in the longest line. Adjust until you hit 60-70 characters. The exact pixel value depends on font, size, and letter-spacing — there is no universal pixel number.

Two-column exception: When text is set in narrow columns (sidebars, cards, multi-column layouts), 35-45 characters per line is acceptable because the vertical distance between lines is shorter, making the return sweep easier.

  1. Set line-height (leading) based on context. Leading is the vertical distance between baselines. Too tight and lines collide visually; too loose and the text disintegrates into separate strips.

| Context | Line-Height | Rationale |

| -------------------- | ----------- | ---------------------------------------------------------------------- |

| Body text (16-18px) | 1.5-1.65 | Optimal for sustained reading |

| Large body (20-24px) | 1.4-1.5 | Larger text needs proportionally less leading |

| Headings (24-48px) | 1.1-1.25 | Tight leading keeps multi-line headings cohesive |

| Display text (48px+) | 1.0-1.1 | Very large text looks disconnected with normal leading |

| Captions (12-14px) | 1.4-1.5 | Small text needs generous leading for legibility |

| Code blocks | 1.5-1.7 | Programmers scan vertically; generous leading aids line identification |

The inverse relationship: as font size increases, optimal line-height ratio decreases. Stripe demonstrates this: body at 16px uses line-height 1.40, but display headlines at 56px use line-height 1.03. The absolute leading increases (22.4px vs 57.7px) but the ratio tightens dramatically.

  1. Set paragraph spacing to 0.5-1.0em between paragraphs. Use margin-bottom on paragraphs, not double line breaks. The spacing should be large enough to signal "new paragraph" but not so large that the text feels disconnected.
  1. Default to left-aligned text for body content in LTR languages. Alignment choices:
  1. Understand reading patterns to structure content. Eye-tracking research (Nielsen Norman Group) identified two primary scanning patterns:

F-Pattern (content-heavy pages):

Z-Pattern (sparse layouts, landing pages):

  1. Optimize the relationship between font size, line-height, and measure. These three properties are interdependent — changing one requires reconsidering the others:

Details

Readability Configurations from Leading Design Systems

Stripe Documentation

Apple Developer Documentation

Medium / Reading-Optimized Platforms

Material Design 3

The Measure-Leading Interaction

Practical table for common configurations:

| Scenario | Font Size | Line-Height | Max-Width | Chars/Line |

| ---------------- | --------- | ----------- | --------- | ---------- |

| Documentation | 16px | 1.6 | 680px | 68 |

| Blog/editorial | 18px | 1.7 | 720px | 62 |

| Literary reading | 21px | 1.6 | 680px | 52 |

| Dashboard text | 14px | 1.5 | 480px | 55 |

| Card description | 14px | 1.45 | 320px | 38 |

| Code block | 14px | 1.6 | 880px | 100 |

Code blocks are the exception to the 75-character rule — developers expect wide lines and horizontal scroll, and the monospace font provides character-level position tracking that proportional fonts cannot.

Hyphenation and Justification

Justified text is the default in print because page layout engines (InDesign, TeX) have sophisticated paragraph-level justification algorithms. Web browsers do not — they justify line by line, producing inferior results.

If you must use justified text on the web:

.justified-text {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  word-break: break-word; /* prevent overflow on long words */
  overflow-wrap: break-word;
  max-width: 680px; /* justified text requires controlled measure */
}

Even with these settings, justified web text will have visible rivers in narrow columns. If the container is narrower than 500px, never justify.

Anti-Patterns

  1. Full-width body text. Setting body text at width: 100% on a 1920px monitor produces lines of 160+ characters. The eye cannot track back to the correct next line after such a long horizontal sweep. This is the most common readability failure on the web. Fix: max-width: 65ch or a pixel equivalent based on your font.
  1. Cramped leading. Line-height of 1.0-1.2 for body text (16px font, 16-19px line-height) causes ascenders and descenders of adjacent lines to collide visually. The text feels dense, claustrophobic, and tiring. Common cause: inheriting line-height: 1.2 from a CSS reset that was designed for headings, not body text. Fix: set body line-height explicitly to 1.5-1.65.
  1. Justified text without hyphenation. Justified text distributes extra space between words to fill the line. Without hyphenation, long words force enormous gaps. On narrow columns (300-400px), individual lines can have gaps wider than the words themselves, creating "rivers" of white space that flow vertically through the paragraph. Fix: either add hyphens: auto or switch to text-align: left.
  1. Centered body paragraphs. Centering more than 3 lines of text destroys the fixed left edge that the eye uses to locate the start of each new line. Reading speed drops by 10-20% (per Nielsen Norman Group research). Fix: center only headings, short taglines, and CTAs. Left-align all body paragraphs.
  1. Uniform line-height across all sizes. Setting line-height: 1.5 globally means a 48px heading gets 72px of leading (excessive, text floats apart) while 12px captions get 18px (possibly too tight). Fix: define line-height per text role, with the ratio decreasing as font size increases.

Real-World Examples

Fixing a Documentation Site

Before: 14px body, line-height 1.3, full-width (1200px container), justified alignment. Users reported "eye strain" and "losing my place."

After: 16px body, line-height 1.6, max-width 680px centered in the layout, left-aligned. Bounce rate decreased 15%, average time on page increased 25%. The changes were purely typographic — no content, layout, or color changes.

Optimizing a Reading App

A Kindle-style web reader tested 3 configurations with 500 users:

Config B won on reading speed. The 18px size with 1.6 leading hit the optimal balance — large enough for comfortable reading without reducing characters-per-line below 55.

Source

Process

  1. Evaluate — Measure the current line length (characters per line), line-height ratio, and paragraph spacing. Identify the reading pattern appropriate for the page type (F-pattern for content, Z-pattern for sparse layouts).
  2. Apply — Set max-width to achieve 45-75 characters per line. Set line-height appropriate to font size (1.5-1.65 for body, 1.1-1.25 for headings). Left-align body text. Add paragraph spacing at 0.5-1.0em.
  3. Verify — Count characters per line with real content. Check that the squint test shows clear paragraph separation. Confirm that line-height produces no visual collision between ascenders and descenders.

Harness Integration

This is a knowledge skill. When activated, it provides readability optimization expertise for text layout decisions. Use these principles when setting max-width, line-height, text-align, margin-bottom, and hyphens properties. Cross-reference with design-responsive-type for viewport-adaptive adjustments and design-content-density for information-rich interfaces.

Success Criteria

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.