- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Wed, 22 Feb 2012 00:30:38 +0100
- To: www-style@w3.org
On 02/21/2012 03:39 AM, Kang-Hao (Kenny) Lu wrote: > (12/02/20 23:49), fantasai wrote: >> The template slots are defined as a "letter", but this is imprecise. >> They should probably be defined as CSS identifiers consisting of a >> single grapheme cluster. You could also consider restricting them to >> start with nmstart. Either way this will loop in the appropriate >> character range restrictions using existing definitions in CSS. > > Note that restricting the syntax to a single nmstart means that you > can't use "special characters" like "@", "." and the like. I not not > sure that's desirable. (Perhaps it is. I really have no idea.) Also, we > are talking about of subset of<string> instead of identifier, which > nmstart is for. That's intended. >> (We could restrict slot names to a single nmstart character; however >> this would mean that whether à is a valid slot name depends on the >> style sheet's Unicode normalization form, which seems like a bad >> idea.) > > Making the slot name accept a graphme cluster doesn't solve the problem > completely since I assume we won't ask a UA to do normalization when a > UA compares strings between 'grid-cell' and 'grid-template'. I would > argue that disallow à in its decomposed form would actually make it > easier to find hideous bugs like mismatch of normalization forms of > 'grid-cell' and 'grid-template'. Ouch. I forgot, we need to specify what normalization (if any) is applied to CSS identifiers for them to be considered identical. Likewise for strings, if they're being used as identifiers. (They currently are in css3-grid-layout.) > Since we are talking about 'grid-cell' here, the "letter" used is likely > the first "letter" of the @id attribute of the HTML element. It's also possible that we would want to reference slot names by using CSS identifiers rather than strings -- Bert's css3-layout draft does this. In which case, restricting the syntax will make things easier to understand. Note that CSS identifiers can start with non-nmstart characters; they just have to be escaped. And that if an HTML author is using an ID that begins with a character that is not nmstart, they already have to escape that character when writing ID selectors. ~fantasai
Received on Tuesday, 21 February 2012 23:31:08 UTC