Forum Feature requests

Word widows

tommyp
It would be great to specify the minimum number of words on a line.

To stop this sort of thing happening you currently need some sort of markup e.g.   between the last words or a span with a white space directive

SPICED CAULIFLOWER WITH TOASTED COCONUT AND RED
LENTILS

Setting word widows to 3 would get:

SPICED CAULIFLOWER WITH TOASTED COCONUT
AND RED LENTILS

Markup solutions don't work well when we reference the content with e.g. target-content:

p.toc2 a:before {
content:target-content(attr(href));
word-widows:4
}

to get a more balanced entry for our contents page:

SPICED CAULIFLOWER WITH TOASTED
COCONUT AND RED LENTILS

Tom


jim_albright
You can change the tracking on just that paragraph to fix it.

Jim Albright
Wycliffe Bible Translators

dauwhe
I think a more potentially useful concept is the idea of text-wrap: balance. See http://blogs.adobe.com/webplatform/2013/01/30/balancing-text-for-better-readability/

And Prince's own pjrm has commented: https://lists.w3.org/Archives/Public/www-style/2013Jan/0614.html

CSSWG hasn't talked about this in a while; I'll try to find out what's going on.

Dave


dauwhe
Ah, this is actually in CSS Text Level 4!

https://drafts.csswg.org/css-text-4/#text-wrap

I'd love to see Prince implement this.