Where are unicode escapes allowed?

http://www.w3.org/TR/css3-syntax/#referring defines how characters not 
allowed in the current encoding may be put in a stylesheet anyway. It is 
also said to use this escape facility only if needed. But theroretically 
(maybe for obfuscation purposes) it may be used to extremes:

.x1, .x2, .x3 { color: red; }

/* normal: */

/* .x2{color:#0a0} fully escaped: */ 

/* .x3{color:#0a0} partly escaped - not the css special chars: */ 

(see testpage at http://cthedot.de/cssutils/test.html)

Only .x1 and .x3 are green in FF2, IE6+7 (IE5.01-5.5 but also the newest 
Opera 9.24 do not recognize .x2 either).

I guess using unicode escape sequences for special CSS characters like 
., #, {, : }, etc generally escape theses characters as well (I could 
not find the spec page but remember reading this somewhere).

The result would be: Unicode escape normalization (meaning using the 
actual chars) can only happen *after* the tokenization is done and not 
on the raw css text?

Could one define a list of Tokens (defined at 
http://www.w3.org/TR/css3-syntax/#tokenization) for which escapes are 
possible? Would the following list be correct and complete:

'ATKEYWORD' (plus all the specific ones defined in CSS2.1),
'INVALID' (only defined in CSS2.1 yet),

Or is even this too comprehensive as even Opera fails to recognize .x2 
as a valid rule?


Received on Thursday, 8 November 2007 14:38:13 UTC