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

Re: [css3-text] text-transform:capitalize

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Mon, 21 Feb 2011 13:37:08 +0100
Cc: "'WWW International' (www-international@w3.org)" <www-international@w3.org>
Message-Id: <54171DD9-D648-42EF-B1BE-14A7CD5181B0@crissov.de>
To: W3C style mailing list <www-style@w3.org>
Brady Duga:

> it seems like there is no way to get both French (l'histoire -> L'Histoire) and English (can't -> Can't) titlecasing without using language-specific word break tables.

You could probably special-case on character count (0, 1, 2 or more) before and after the punctuation. The following is just an example, not necessarily best practice.

 a'b  => A'B ?
 a'   => A'
  'b  => 'b
ab'   => Ab'
  'ab => 'Ab
ab'c  => Ab'c
 a'bc => A'Bc
ab'cd => Ab'cd

same for ’
Received on Monday, 21 February 2011 12:39:46 GMT

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