W3C home > Mailing lists > Public > www-style@w3.org > August 2011

[css3-text] text-wrap: punctuation

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Sat, 20 Aug 2011 10:48:39 +0200
To: www-style list <www-style@w3.org>
Message-Id: <2F6BAE65-5F88-4750-9891-81634EF07BF5@crissov.de>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:43 GMT