Re: [css-variables] Comments on WD-css-variables-20130312

On Sat, Mar 30, 2013 at 3:53 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
> Le 30/03/2013 00:30, Tab Atkins Jr. a écrit :
>
>>> The reference to <ident> is misleading, the author-
>>> defined part of the name would not be a token on its own; say something
>>> like 'A custom property is any property whose name starts with "var-"'
>>> instead.
>>
>> Nope, the part after "var-" needs to conform to the <ident> grammar,
>> so you can use it as a bare value in the var() function.
>
> Does it really? What matters is that the parsed value of the identifiers
> match, right? It shouldn’t matter if they use different escaping.
>
> For example, var-1st is a valid property name, but 1st is not an <ident>.
> You can still write an ident with the same parsed value by escaping the
> digit: var(\31st)
>
> Sure, we might recommend to authors not to do that because it’s ugly. But
> there is no reason to require UAs to disallow it.
>
> Actually, detecting var-1st vs. var-\31st would require a special case in
> the tokenizer. We did that for ID selectors for legacy reasons[1], but let’s
> not repeat that pattern.

Convincing.  I've stolen your suggested text and relaxed the requirement.

~TJ

Received on Monday, 1 April 2013 16:12:48 UTC