Comment by rpastuszak

14 hours ago

Love this. I especially liked shape based reflow example.

This is something I've been thinking for ages and would love to add to Ensō (enso.sonnet.io), purely because it would allow me to apply better caret transitions between the lines of text.

(I'm not gonna do that because I'm trying to keep it simple, but it's a strong temptation)

Now a CSS tangent: regarding the accordion example from the site (https://chenglou.me/pretext/accordion), this can be solved with pure CSS (and then perhaps a JS fallback) using the `interpolate-size` property.

https://www.joshwcomeau.com/snippets/html/interpolate-size/

Regarding the text bubbles problem (https://chenglou.me/pretext/bubbles), you can use `text-wrap: balance | pretty` to achieve the same result.

(`balance` IIRC evens out the # of lines)

> Regarding the text bubbles problem [...], you can use `text-wrap: balance | pretty` to achieve the same result.

No, neither solves the problem. And even if `balance` did work, it's not a good substitute because you don't usually want your line lengths to all be the same length.

See also, related CSS Working Group issue: https://github.com/w3c/csswg-drafts/issues/191

text-wrap can help to balance out the number of words per line, but it still doesn’t eliminate the extra empty space on the right edge of the box.