Re: [csswg-drafts] [css-text] Add `text-wrap-last` for orphan avoidance; remove orphan control from `text-wrap-style` (#12716)

What would `text-wrap-last` do to single-line blocks? `text-align-last` affects them, but I doubt you want this to do so.

For "pretty" body text, I would suggest there are _two_ cases that should be avoided: a very short last line, and a very full one. The behavior described here only considers the latter. But in general it's unrealistic to require every last-line to be less than half the width. IMO, readability does not require the last line to be no more than half-width; it only requires it to be significantly less than entirely full. So a `pretty` value should ensure the last line is _at least_ X% of the width and _at most_ Y% of the width, where X and Y are perhaps something like 20 and 80 respectively. (Maybe they should be author-controlled?)

Also, the word "ensure" is too strong (especially with such an extreme constraint on the length, but even if this is loosened). There will be cases where it is impossible to make the last line fit this constraint except by doing serious violence to the earlier lines -- especially in the case of a two-line paragraph, where there is very little flexibility. So the spec for such a "pretty" value needs to speak in terms to "attempt to ensure" or something like that (maybe "attempt to avoid" certain things is a better way to express the intent), recognizing that there may be conflicting constraints, and sometimes the attempt will fail.


-- 
GitHub Notification of comment by jfkthame
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12716#issuecomment-3245731874 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 2 September 2025 15:03:17 UTC