Interface typography · 7 min read
Every line break is a layout decision.
text-wrap: balance and text-wrap: pretty can make type feel deliberately composed. The useful part is knowing what each asks the browser to do—and when to leave the text alone.
The problem
A heading leaves one small word on the last line. A paragraph ends with a weak fragment. A translated label suddenly occupies two rows. Nothing is technically broken, yet the interface feels less resolved.
Designers often repair these moments with a manual <br> or a non-breaking space. The result looks correct at one width, with one font, in one language. Then the container changes.
A line break that survives only one screenshot is not typesetting. It is hard-coded coincidence.
Balance the shape
Normal wrapping fills each line in sequence. balance asks the browser to consider a short block as a whole and reduce the uneven space left across its lines.
This makes it a good first choice for page titles, card headings, pull quotes, and concise calls to action. It should improve the silhouette, not force every line to be identical.
Small details make digital products delightful
Small details make digital products delightful
Move the width slowly. Balance is most useful around the moments where a new line appears.
Protect the reading edge
pretty has a different job. It asks the browser to spend more effort on typographic quality: a calmer rag, fewer awkward endings, and better decisions around short final lines.
Use it for prose, captions, and descriptions. The change can be subtle—and that is the point. Reading should feel easier without the reader noticing the property that helped.
A good interface stays calm when names grow, fonts load, and translations arrive with different rhythms.
A good interface stays calm when names grow, fonts load, and translations arrive with different rhythms.
Look at the final line and the overall rag. The preferred result may change as the measure changes.
Content moves the break
A manual break knows nothing about a new language, a fallback font, browser zoom, or a narrower container. A wrapping preference can react because it leaves the decision until layout time.
Change the language below. The left version keeps an art-directed break embedded in the sentence; the right version keeps only the intent.
Interfaces should remain
clear when everything changes
Interfaces should remain clear when everything changes
A break is safe only when it carries meaning. If it merely repairs one composition, let the browser move it.
Preferences, not promises
The exact algorithm is deliberately browser-defined. Two engines can choose different breaks, and an unsupported browser simply keeps normal wrapping. That makes these values useful progressive enhancements, but poor dependencies for correctness.
Wrapping also selects only from breaks that are already legal. A long URL will not become safe because pretty is present. Language, direction, hyphenation dictionaries, font metrics, weight, zoom, and container width all participate in the result.
- Short displayStart with
balance; keep it when the shape improves across every wrap transition. - ProseStart with
pretty; make sure ordinary wrapping is still a correct fallback. - Editable textPrefer
autoorstableso earlier lines do not jump while someone types. - User contentAdd
overflow-wrap: anywherewhen unbroken strings must never escape.
A practical default
Give the browser a preference, a sensible measure, and enough room to adapt.
.display-heading {
max-inline-size: 24ch;
text-wrap: balance;
}
.editorial-copy {
max-inline-size: 64ch;
text-wrap: pretty;
}
.user-content {
overflow-wrap: anywhere;
}
A manual <br> is still right when the break carries meaning—an address, a poem, or fixed art direction. It is fragile when it only repairs one viewport.
The result
Good wrapping is almost invisible. The title reads as one thought. The paragraph ends without calling attention to itself. The component survives a smaller screen, a longer translation, and a different browser.
The browser already has more context than a manual line break ever will. Give it a preference, preserve its ability to adapt, and test the moments where that preference stops helping.
Use it as a skill
Install the decision guide when you want these typography checks available during interface work.
npx skills add daniasyrofi --skill interface-typesetting