CSS text-wrap: pretty — sounds great, would love for Safari to support this more lightweight balancing. /cc @jensimmons
=> More informations about this toot | More toots from typesetting@mastodon.social
@typesetting Try it out in Safari Technology Preview by enabling the flag.
=> More informations about this toot | More toots from jensimmons@front-end.social
@jensimmons No way! Will do. Thanks! 😄
=> More informations about this toot | More toots from typesetting@mastodon.social
@typesetting We’d love to have any feedback you have. (Test in Safari Technology Preview, after enabling the flag & re-opening the browser.)
Here’s a demo: https://codepen.io/jensimmons/pen/xxvoqNM?editors=1100
=> More informations about this toot | More toots from jensimmons@front-end.social
@jensimmons @typesetting Is text-wrap:pretty
supposed to turn hyphenation off? (Because it does at the moment)
=> More informations about this toot | More toots from Richr@mastodon.social
@jensimmons @typesetting ...otherwise this does what I'd expect it to. Glad to see the implementation is a bit cleverer than just dealing with a widowed word - the algorithm clearly looks further back in the paragraph in order to apply a better solution.
=> More informations about this toot | More toots from Richr@mastodon.social
@jensimmons @typesetting One day we'll get full Knuth-Plass justification with variable word and letter spacing. Hopefully without us devs/authors having to do anything beyond text-wrap:pretty
. It'll just be added to the 'pretty' algo when browsers and (detected) computing power is ready for it.
=> More informations about this toot | More toots from Richr@mastodon.social
@Richr @typesetting Yes. If your try our demo with a narrower viewport, you’ll see that it doesn’t just fix widows, but also makes other adjustments (even in paragraphs that don’t have a widow) — to make the line lengths more consistent across the paragraph.
=> View attached media | View attached media
=> More informations about this toot | More toots from jensimmons@front-end.social This content has been proxied by September (3851b).Proxy Information
text/gemini