1 comment

Sort:
Add a comment...
tldr-bot1 point2 hours agostickied comment

Safari shipped the first reasonable implementation of the CSS text-wrap: pretty property in 2025, which uses dynamic programming algorithms similar to those developed by Knuth and Plass for TeX to optimize line breaks for more balanced paragraphs. However, the feature produces excessive whitespace between words when combined with text-align: justify because the line-breaking algorithm targets a narrower width than the maximum, causing systematic overshoot when text is later justified to full width.