W3C home > Mailing lists > Public > www-style@w3.org > August 2012

[css3-values] case sensitivity of user identifiers

From: John Daggett <jdaggett@mozilla.com>
Date: Wed, 8 Aug 2012 06:53:13 -0700 (PDT)
To: www-style list <www-style@w3.org>
Message-ID: <1521453443.174428.1344433993741.JavaMail.root@mozilla.com>

>From the wiki page on case-sensitivity of author-defined identifiers [1]:

> So, we resolved to make user-defined identifiers (like counter-names
> and namespace prefixes) case-sensitive to avoid dealing with Unicode
> case-folding and other complications.

When exactly was this resolved and did the resolution rely on the
assumption that "case folding is hard in Unicode"?  Searching through
the archives I can only find discussions of attribute case
sensitivity.

I'm puzzled by why some folks are claiming Unicode case-folding is
hard in the context of identifiers.  Unicode gives rules for (1)
simple case folding and (2) full case folding [2].  The simple case is
a 1-to-1 mapping that doesn't alter string length and is *not* locale
sensitive while full case mapping can involve string expansion and
locale-sensitive behavior. Since these are casing rules for a design
language and *not* the content itself, why is it necessary to use full
case mapping?  Simple case mapping isn't hard and makes much more
sense given the context.  The minor limitations it brings are just
the same as those caused already by not using normalized comparisons
of identifiers containing modifiers or variation sequences.

> This is fine for things that are entirely user-defined, like
> counters and namespace prefixes, but Tab noticed that it presents a
> problem when we get to counter-styles: all our styles right now are
> predefined keywords, and are thus case-insensitive ASCII. When we
> use @counter-style to define counter styles, we will be allowing
> users to create their own counter styles. Will those be
> case-sensitive? What if the user redefines an existing
> counter-style?
> 
> Problem Statement
> 
> When UA identifiers (insensitive) and user identifiers (sensitive)
> co-exist, and UA identifiers are defined in terms of user-defined
> syntax (e.g. @counter-style), what is the case-sensitivity story?

I think having some idents be case-sensitive and some not is going to
create a big headache that's more trouble than it's worth.  I especially
don't like it because so many authors have the notion that "CSS is case
insensitive" drilled into their head.

Regards,

John Daggett

[1] http://wiki.csswg.org/topics/custom-ident-case-sensitivity

[2] http://unicode.org/Public/UNIDATA/CaseFolding.txt
Received on Wednesday, 8 August 2012 13:53:45 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:58 GMT