Safari's text-wrap: pretty: A New Era in Web Typography

2025-04-08
Safari's text-wrap: pretty: A New Era in Web Typography

Safari Technology Preview 216 introduces `text-wrap: pretty`, revolutionizing web text layout. Leveraging paragraph-based algorithms, it tackles longstanding typographic issues like excessively short last lines, uneven ragged edges, and distracting typographic rivers. Unlike traditional line-by-line algorithms, `pretty` evaluates the entire paragraph, optimizing layout for improved readability and aesthetics. While Chrome and other browsers support `pretty`, Safari's implementation is more comprehensive, adjusting the entire paragraph instead of just the last few lines. `text-wrap: balance` focuses on making all lines roughly the same length, ideal for headlines and shorter text. Developers should choose the appropriate `text-wrap` value based on their needs and be mindful of performance implications.

Development web typography