- From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
- Date: Thu, 26 Apr 2012 05:32:47 +0800
- To: fantasai <fantasai.lists@inkedblade.net>
- CC: WWW Style <www-style@w3.org>, Jonathan Kew <jonathan@jfkew.plus.com>
(12/04/21 10:56), fantasai wrote: >> (a) that we're happy with the CSS3 Text definition here, as far as it >> goes, in particular recognizing that it means certain word-initial >> punctuation characters will be treated differently by ‘first-letter’ >> and ‘capitalize’; and The corresponding prose to this question is # ‘capitalize’ # # Puts the first letter of each word in titlecase; other characters # are unaffected. and # A letter for the purpose of this specification is a character # belonging to one of the Letter or Number general categories in # Unicode. [UAX44] > I guess your question here is really > - Should the letter after an underscore, hyphen, or em-dash be > capitalized? > > A key question is what happens to a hyphenated word, should > "well-intended" become > "Well-Intended" or "Well-intended"? > > Otherwise I'm leaning towards the IE9 behavior, too. :) Filed as > https://www.w3.org/Style/CSS/Tracker/issues/240 The description in the issue is indeed a better description of the problem: "CSS3 Text suggests UAX29 for determining word boundaries for 'text-transform: capitalize'. This means a letter after a hyphen, em-dash, or underscore is capitalized. Is this what we want?" but given that the spec doesn't have normative requirements on UAs about how to determine word boundaries: # The definition of "word" used for ‘capitalize’ is UA-dependent; # [UAX29] is suggested (but not required) for determining such word # boundaries. it seems very unfair to Firefox (and partly to WebKit) because this vagueness doesn't cover cases Jonathan brought up: "_css_", "-test-", while it covers all Koji[1] and Xaxio[2]'s cases, which include "the.the" and "dog/wolf" and some others. Therefore, I believe the correct rephrasing of the question (which is more of less related but not the same as fantasai's question) is: - Do we want to accidentally make Firefox and WebKit non-conforming in this level by boring cases like "_css_" and "-test-"? If no, the spec should change to something like | ‘capitalize’ | | Puts the first character of each word in titlecase; other characters | are unaffected. . In fact, this saves IE9 too, for this particular test case: "'test'". If we instead want get more interoperability on 'text-transform: titlecase;' at this level, we should probably start by looking at "dog/wolf", which seems more like a useful case. (full UAX#29 seems too infeasible at this level.) [1] http://lists.w3.org/Archives/Public/www-style/2011Feb/0564 [2] lists.w3.org/Archives/Public/www-style/2011Feb/0574 Cheers, Kenny
Received on Wednesday, 25 April 2012 21:33:18 UTC