THE GITHTML FIELD GUIDE

Constrain long reading lines with a flexible measure

Limit the reading column with a maximum inline size while allowing it to shrink to the available space. A ch-based measure is a useful starting point, not an exact character-count guarantee. Keep wide tables and diagrams independently usable instead of widening every paragraph to accommodate the largest object.

Choose the right representation

A tablet in landscape can display a report so widely that returning to the start of the next line becomes tiring. The page is technically responsive yet uncomfortable to read. A flexible maximum measure addresses this without forcing a fixed-width page on a phone.

Apply the pattern deliberately

Set the maximum on the prose container and use automatic inline margins to center it where space permits. The ch unit relates to a font metric, so actual letters, language, and font choice affect the result. Adjust using representative paragraphs rather than counting characters in one sentence.

  1. Constrain prose separately from legitimately wide evidence such as tables and detailed diagrams.
  2. Use a maximum size rather than a fixed width that can exceed the viewport.
  3. Evaluate a real paragraph in each supported language before settling on the measure.
css
.prose { max-inline-size: 68ch; margin-inline: auto; padding-inline: 1rem; }

Separate the paragraph measure from the page width

Start with a paragraph long enough to require several returns to the beginning of the next line. If your eyes repeatedly lose that beginning on a wide display, constrain the prose container rather than the entire document. Keep navigation, captions, tables, and diagrams under their own layout rules. A report can offer a comfortable narrative column while still allowing a detailed figure to use more of the available space.

A maximum is not a command to occupy that width on every screen. Let the containing layout shrink naturally, and inspect padding and box sizing when the result still overflows. A fixed child width, an unbroken identifier, or a flex item that refuses to shrink can defeat an otherwise reasonable prose maximum. Identify which element is wider than its container before reducing the body font. Small type often hides the symptom while making the actual reading task harder.

The sample measure is a starting point for your own text, not a promise of exactly sixty-eight characters per line. Proportional fonts, letter shapes, languages, and font substitutions change how much text fits. Compare a normal paragraph, a paragraph with several long technical terms, and a translated passage. If the report uses a downloadable font, inspect the fallback as well. The accepted design should remain comfortable when the preferred face is unavailable or the reader chooses larger text.

Check the finished reading experience

Read several paragraphs at normal and enlarged text sizes. Look for a comfortable rhythm without treating one numerical measure as a universal accessibility requirement.

Sources and further reading

AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.

All reading html on your phone guides →

Read as MarkdownAll guides

Constrain long reading lines with a flexible measure · gitHtml