W3C home > Mailing lists > Public > www-style@w3.org > February 2013

[css3-syntax] Both ; and {} should end all at-rules

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Sat, 23 Feb 2013 21:23:02 +0100
Message-ID: <51292526.30202@kozea.fr>
To: www-style@w3.org
Hi,

This is a recent change, but the 23 February 2013 ED distinguishes 
at-rules that end with ; and those that end with {}. When encountering 
the "wrong" end delimiter, the parser considers it a normal of the 
at-rule’s prelude and continues parsing the prelude. Instead, both ; and 
{} blocks should end any at-rule, even when the other is expected.


Consider these test cases:

data:text/html,<style>@media;body{background:green
data:text/html,<style>@import{}body{background:green

Both of them have an (invalid) at-rule that ends just before "body". The 
current ED would instead parse an @media rule whose prelude goes up to 
"{", and an @import rule whose prelude goes until the end of the 
stylesheet. In both cases, it fails to parse the style rule.


(By the way, this issue disappears if we get rid of 
recognized/rule-filled/declaration-filled at-rules concepts as in 
http://lists.w3.org/Archives/Public/www-style/2013Feb/0411.html )

Cheers,
-- 
Simon Sapin
Received on Saturday, 23 February 2013 20:23:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT