W3C home > Mailing lists > Public > www-style@w3.org > April 2013

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 1 Apr 2013 09:12:01 -0700
Message-ID: <CAAWBYDANCkWcS+gcg0-5Ae6VQ81fnD_ODQ7_LzMSuTycQJt1zQ@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: Bjoern Hoehrmann <derhoermi@gmx.net>, www-style list <www-style@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:10 UTC