Re: Case Sensitivity in CSS [I18N-ACTION-171]

* Tab Atkins Jr. wrote:
>On Wed, Jan 16, 2013 at 1:25 AM, John Daggett <jdaggett@mozilla.com> wrote:
>> I think you can have case sensitive user identifiers and still match
>> existing keywords case insensitively.  I don't see that as being that
>> confusing to authors.
>
>I believe it would be confusing if "@counter-style foo {}" and
>"@counter-style FOO {}" defined two different counter styles, but
>"@counter-style square {}" and "@counter-style SQUARE {}" defined the
>same counter style and overrode each other.
>
>The same argument for confusion can be made for property names, if
>"color" and "COLOR" are the same property, but "var-color" and
>"var-COLOR" and "VAR-color" are all different property names.  The
>latter also makes it harder to deal with the var() function, which
>drops the var- prefix from the variable name - is the "var" part of a
>custom property name CI, but the rest CS?  Is it only valid if you
>write literally "var-", not "VAR-"?

It would of course also be confusing if you try to access some style
sheet identifier `MyIdentifier` in script and that fails because the
implementation normalized it to `myidentifier`. Same when the casing
is lost during serialization or in the debugger. It's clearly more im-
portant to have things work as expected for people who use consistent
spelling of their identifiers than people using inconsistant spelling;
that does not rule out case-insensitive matching, but the original in-
put must not be lost after parsing as you suggested earlier.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Wednesday, 16 January 2013 17:14:46 UTC