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

Re: [css3-text] @text-transform

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Mon, 5 Dec 2011 08:43:23 +0100
Message-Id: <8CD9CA1D-9306-46AC-BC50-43A0FA373A38@crissov.de>
To: www-style list <www-style@w3.org>
>  @text-transform titlecase {/* exclusions */
>    convert: "and or the an a on by in at from to with without within out of off into onto upon" /*…*/;
>    language: en;
>  }

That doesn’t work. Although I suggested to use space-separated lists inside the strings, the items itself should usually still apply within words, so in “to Toronto” there should be 1 match, but it would be affected 3 to 5 times by ‘to’, ‘or’, ‘on’, ‘onto’ and ‘to’; initial ‘To’ isn’t affected, because the conversion is case-dependent. 
It would have to be specified whether ‘on’ and ‘to’, ‘onto’ or all three (and in which precedence) apply.

The ‘scope’ descriptor mentioned earlier could help for some:

  scope: [ phrase || word || [ partial | [ initial || medial || final]# ] 
        || character || base || diacritic ]#

I first thought you could introduce a special character to disambiguate prefix, suffix etc., but that hardly works well – not least because infixes should be the default and you it should be able to change punctuation, too.

  convert: "-- ---" to "– —";
  convert: "hyphen-case" to "CamelCase";
  convert: "prefix- –infix- -suffix word";
  convert: "-list-of-infixes-a-b-c-";

  convert: "#prefix infix suffix# #word#";
  convert: "list of infixes a b c";

  convert: "prefix"-, -"infix"-, -"suffix", "word";
  convert: -"list of infixes a b c"-;

  convert: #"prefix", "infix", "suffix"#, #"word"#";
  convert: "list of infixes a b c";

  convert: "prefix", "infix", "suffix", "word";
  convert: , "list of infixes a b c", , ;
Received on Monday, 5 December 2011 07:43:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:08 UTC