Re: Case Sensitivity Issue and CSSOM

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.

Cheers,

John

Received on Thursday, 24 January 2013 02:13:52 UTC