Re: [css3-grid] [css3-layout] Template Slot Names

(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.

> The definition of grapheme cluster in this instance needs to be marked
> as non-tailorable. I am unsure whether legacy or extended grapheme
> clusters are appropriate in this case; I would mark this as an issue
> and ask i18n for feedback. (Elsewhere in CSS we use extended grapheme
> clusters and allow tailoring, but that is because they are used for
> rendering interpretation, not syntactic interpretation.)

If we are really going the graphme cluster route, I agree.

> (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'.

Since we are talking about 'grid-cell' here, the "letter" used is likely
the first "letter" of the @id attribute of the HTML element. Given that
@id can be arbitrary since HTML5, I see less reasons why we want to
restrict the syntax to nmstart, although I still doubt we want anything
beyond letter = a single Unicode code point. Some data on how people use
@id around the world might be helpful here.


Cheers,
Kenny

Received on Tuesday, 21 February 2012 02:39:59 UTC