Re: Issue in CSS21 grammar?

On Thu, Feb 26, 2009 at 4:42 AM, Anne van Kesteren <annevk@opera.com> wrote:
> On Thu, 26 Feb 2009 05:07:40 +0900, fantasai <fantasai.lists@inkedblade.net>
> wrote:
>>
>> Let me answer that question with another question.
>> How many out of how many browsers fail this test?
>>   http://www.w3.org/Style/CSS/Test/CSS2.1/current/html4/ident-008.htm
>>
>> Mozilla, Opera, and Safari have all converged on passing this test.
>> Does it really make sense to change that now?
>
> It's not much of a hassle to change this to be honest (implementation wise)
> and it sort of seems worth it to remove arbitrary restrictions when
> possible.

As an author, I have to say I'm particularly confused by CSS's
inability to handle classes starting with numbers (without escaping).
As far as I can tell, to match the class "123456", you'd have to write
".\31 23456" or ".\00003123456", right?  That seems remarkably
surprising given that HTML permits classes to begin with numbers, and
as far as I know always has.  I can imagine it taking me quite a while
to debug that if I hadn't had this discussion (I didn't know about
that constraint until I read the test case fantasai posted).

The change doesn't introduce backward incompatibility with any
existing valid stylesheets.  To the extent it introduces
incompatibility with existing *invalid* stylesheets, it might just as
likely make them work closer to how the author intended instead of the
opposite.  And it doesn't seem to me like it would be a significant
hassle for implementers to change, which Anne agrees with.  So I don't
see why there's any need to preserve browser convergence on this
detail.

Received on Thursday, 26 February 2009 15:26:28 UTC