Re: [CSS2.1] blocks with missing start bracket and parsing error

* Alan Gresley wrote:
>This time the pertinent CSS is this.
>
>
>     p { background: blue }
>
>     ]
>
>    .test1 { background: green }
>
>Currently all browser will show one blue line and one green line. Unlike 
>the 'missing end bracket' situation, we have a 'missing start bracket'. 
>My question is, what should happen?

If you can't cite a reason why this is unclear from the specification
and all the major implementation exhibit the same behavior then there
does not seem much reason to ask that question (you might request some
clarification why some behavior is correct or suggest an addition to
the test suite if you think the case merits that).

Anyway, there is nothing special about `]` here. In the context above
you are essentially parsing a selector which does not allow `]` as the
leading token, which invokes the rule for "Malformed statements", that
is, you read until the end of the statement, which is at the white
space after the second `}` and drop the whole thing (and continue with
the next statement that follows, giving you the behavior you mention).
-- 
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 Sunday, 27 March 2011 00:52:21 UTC