Re: CSS parser recovery

On Sat, 14 Dec 2002, Tantek Çelik wrote:
> If you are referring to IE6/Windows, the original example given:
>  p { color : green ; q{color : blue ; }
>  samp { color : red ; }
> renders the paragraph green and the samp red

Um, no it doesn't. That renders all green (unless you trigger quirks mode,
but that is out of scope for this discussion).

Anyway, that wasn't the original example. The original example was:

   p {color: green; /* missing "}" */
   q {color: blue;}
   samp {color:red;} an XHTML document. Since WinIE doesn't support XHTML, I've turned it
into an HTML equivalent document (and slightly changed the text so as to
not be confusing) without changing the stylesheet, and you can see that
WinIE6 in fact renders everything green:

Indeed it passes all the tests too: do Mozilla and (I understand) Konqueror.

>> that have been
>> (arguably) compliant with this portion of the spec for quite some
>> time,
> certainly not as long a time.

I just downloaded the earliest archived copy of Mozilla (that would be
Mozilla M3, released March 1999), and it passes all three tests too. I'm
not sure when IE6 was released, but the copyright says 2001, so it was at
least a year ago. Similarly, Konqueror has done this right for some time,
I checked their CVS tree and I couldn't find a changelog inem mentioning
this being fixed in their cssparser.cpp file over the last 14 months, so I
would guess that that has been over a year too.

A year is about 7% of the lifetime of the Web, about 14% of the lifetime
of CSS1. And that's my conservative estimate.

Yes, a long time.

> And given the minimal (if any) utility of allowing blocks mixed with the
> property, it makes more sense to disallow them.

You are saying it makes more sense to disallow them because while they are
useful, they are not useful enough? That seems like a specious argument.

>> Thus I would prefer the spec to explicitly state that blocks should be
>> parsed on the property side just like they are anywhere else.
> Or we could just decide to never introduce blocks on the property side (no
> big loss), and leave the spec as is (which arguably allows for two
> interpretations as this thread has shown), and leave it
> unspecified/ambiguous what this non-valid snipped of code is expected to do
> in a UA.

Or we could define it as I am proposing, thus backing up three
implementations, keeping our options open, and keeping the spec

Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.                         `._.-(,_..'--(,_..'`-.;.'

Received on Saturday, 14 December 2002 07:07:31 UTC