Re: Case Sensitivity Issue and CSSOM

On Wed, Jan 23, 2013 at 6:13 PM, John Daggett <jdaggett@mozilla.com> wrote:
> Tab Atkins wrote:
>> > Given this, I'm leaning towards Richard Ishida's (?) suggestion
>> > that we leave user-defined idents as case-sensitive and just
>> > grandfather in any CSS-defined keywords as computing to their
>> > lowercase variants.
>>
>> How does this work with custom property names?  Do we require that
>> their prefix be literally "var-", so "VAR-FOO" is an invalid
>> property and thrown away at parse time?
>
> The same way counter(FOO) vs. COUNTER(FOO) is handled today.  The
> 'counter' portion is a CSS keyword and the FOO part is a user-defined
> ident.  Same for the variable syntax, 'var-' is a keyword and follows
> the rules for matching keywords, while 'FOO' is a user-defined ident
> that follows the rules for user defined idents.
>
> The fact that authors may not see 'var-foo' as one part keyword, one
> part user-defined ident is one of the weaknesses of the 'var-' syntax
> that we've just decided to accept.  But if someone is clever enough
> to use variables in their CSS, they can figure out casing rules I'm
> assuming.

That seems weird to me, but if I correctly recall our implementation,
it's probably also just fine for us.  Hm.

~TJ

Received on Thursday, 24 January 2013 18:03:16 UTC