Safari recently shipped a working implementation of CSS text-wrap: pretty, which uses dynamic programming to create balanced line breaks instead of greedy algorithms. However, combining it with text-align: justify creates ugly results with excessively wide inter-word spacing. The issue stems from the algorithm targeting slightly narrower widths to allow under/overshooting, which causes systematic overshoot when justified to full width. The author requests WebKit developers fix this interaction between the two CSS properties.

3m read timeFrom matklad.github.io
Post cover image

Sort: