W3C home > Mailing lists > Public > www-style@w3.org > November 2007

Re: how should this invalid CSS be parsed?

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 04 Nov 2007 07:00:01 +0100
To: csad7@t-online.de (see)
Cc: www-style@w3.org
Message-ID: <3jnqi3p56rvhhjmva36ou6ha7c56336gtc@hive.bjoern.hoehrmann.de>

* see wrote:
>[...]

As an aside, it would be good if you use the New Mail function of your
client rather than the reply function and changing subject and body.

>I have the following CSS
>
>	a {x:1}
>	}
>	b{y:2}
>	c{z:3}

My reading of the latest CSS 2.1 draft is that this is not CSS at all
(it does not parse according to the generic syntax) and it's not clear
whether, despite saying parsing of non-CSS is not defined, there are
rules that cover this case. At best I would agree with you that

>The specification says (as I remember) that if an error is found it is 
>resolved with the next valid block.
>
>So I thought the CSS above should be equivalent to:
>
>	a {x:1}
>	c{z:3}

The } is considered part of the selector, which then fails to parse,
and causes the selector and declaration to be ignored, cf. the third
paragraph in 4.1.7.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Sunday, 4 November 2007 06:00:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:56 GMT