[css3-text] text-wrap: punctuation

Håkon already suggested

  text-wrap: balance;

which I think is useful for headings and list items alike. <http://wiki.csswg.org/spec/text4>

The prose suggests that UAs should prioritize breakpoints after and before certain characters when they appear in sequence. The spec give implementors some freedom in this. Nevertheless, I’d like to propose

  text-wrap: punctuation;

which explicitly p rioritizes breakpoints in or around a run of whitespace and punctuation characters over a run of just whitespace (and that over a run of just punctuation).

  There is a quick brown fox. It jumps
  over a fence.

would be broken

  There is a quick brown fox. 
  It jumps over a fence.

instead. Sadly, it’s not as easy as one may hope, because punctuation characters take different syntactic roles:

  There is a quick, 
  brown fox, named Mr.
  Reynard, and he jumps
  over the fence.

would better be broken like this

  There is a quick, brown
  fox, named Mr. Reynard,
  and he jumps over the fence.

Received on Saturday, 20 August 2011 08:49:21 UTC