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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sat, 23 Feb 2013 20:38:49 -0800
Message-ID: <CAAWBYDAnFD7oUbz5tM-GZC3EPD1h7uZaxUj-JDfZiVHBi0z5Hg@mail.gmail.com>
To: Simon Sapin <simon.sapin@kozea.fr>
Cc: www-style list <www-style@w3.org>
On Sat, Feb 23, 2013 at 12:23 PM, Simon Sapin <simon.sapin@kozea.fr> wrote:
> 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 )

Done.

~TJ
Received on Sunday, 24 February 2013 04:39:36 GMT

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