Re: Results of CSS case-sensitivity discussion at TPAC [I18N-ACTION-157]

Norbert Lindenberg, Mon, 3 Dec 2012 22:33:26 -0800:
> No, by "special cases" we meant the "T" cases in the CaseFolding.txt 
> file of the UCD. SpecialCasing.txt defines special cases for 
> upper/lower/title case. One case that's special in SpecialCasing and 
> not so special in CaseFolding is ß.
> 
> Expressed positively, CSS should use the mappings labeled C and F in 
> CaseFolding.txt.

Given the selector *[DATA-ÆØÅ]{background:lime}
   and the element <foo DATA-ÆØÅ="" >,
then text/html browsers do:

* Opera & IE10 match it, since they roughly case fold according to
  C F, giving selector *[data-æøå]{} & attribute data-æøå="".
  (But Opera performs T folding, while IE appears to not do that.)
  In the DOM, the attribute names as ASCII lowercased, so it seems
  like Opera/IE10 apply some magic to the very selectors.
* Webkit would NOT match it, since it seems to C & F lowercase the
  selector while it ASCII lowercases the attribute, resulting in
  the selector *[data-æøå]{} and the attribute data-ÆØÅ="".[1]
* Firefox matches it, as it performs ASCII lower casing,[2] as
  HTML5 says,[3] giving selector *[data-ÆØÅ]{} and the attribute
  data-ÆØÅ="". (So if author changed attribute to data-æøå="",
  then there would be no match in Firefox, whereas Webkit would
  then start to match while IE10/Opera would continue to match.)

The ASCII lower-casing of @data-FOO was decided quite early in the 
HTML5 process. And it seems logical that CSS selectors match the DOM. 
(In HTML5, elements are ASCII-lowercased in the DOM and I think the 
ASCII lowercasing is a measure to make HTML and XHTML similar.)

Hence I agree with Anne[4] and Boris[2] about about ASCII lowercasing 
inside text/html, including (sigh) in foreign namespaces, such as 
<svg>, inside text/html. For application/xhtml+xml, then there is no 
case folding for CSS identifiers, AFAICT. ASCII lowercasing is not, in 
itself, very logical. On the contrary. But to operate with two forms of 
case folding seems even less optimal. Fortunately, it only applies to 
tag names and attribute names, and not to attribute values (except for 
the (HTML) class selector in quirks mode where it also applies.)

[1] http://lists.w3.org/Archives/Public/www-style/2012Nov/0495

[2] http://lists.w3.org/Archives/Public/www-style/2012Nov/0499

[3] 
http://dev.w3.org/html5/spec/global-attributes.html#embedding-custom-non-visible-data-with-the-data-*-attributes

[4] 
http://lists.w3.org/Archives/Public/www-international/2012OctDec/0109


Leif H Silli

> On Dec 3, 2012, at 15:46 , Phillips, Addison wrote:
> 
>> Hi Tab,
>> 
>> Our minutes are here:
>> 
>>   http://www.w3.org/2012/11/02-i18n-minutes.html#item02

>> 
>> The result of the discussion was that CSS should require full 
>> Unicode case folding without special cases (by which we mean 
>> "SpecialCasing.txt" in the Unicode Character Database, which 
>> includes languages such as Turkish and Latvian).
>> 
>> Richard was actioned with writing up a detailed response, but 
>> hopefully the above is a clear summary. Let me know if you would 
>> like to discuss.
>> 
>> Addison
>> 
>> Addison Phillips
>> Globalization Architect (Lab126)
>> Chair (W3C I18N WG)
>> 
>> Internationalization is not a feature.
>> It is an architecture.
>> 
>> 
>>> -----Original Message-----
>>> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
>>> Sent: Monday, December 03, 2012 3:38 PM
>>> To: WWW International
>>> Subject: Results of CSS case-sensitivity discussion at TPAC
>>> 
>>> Heya, I couldn't find any posted minutes of your TPAC meeting, so 
>>> I'm poking
>>> personally.
>>> 
>>> What was the result of the discussion about CSS identifiers and 
>>> case-sensitivity?
>>> If possible, can you point me to the minutes as well?
>>> 
>>> ~TJ
>> 
> 
> 

Received on Tuesday, 4 December 2012 19:03:17 UTC