Re: [css3-syntax] EOF and } in at-rule preludes and selectors

On Tue, Jan 29, 2013 at 4:36 PM, Simon Sapin <simon.sapin@kozea.fr> wrote:

> Le 30/01/2013 00:30, Glenn Adams a écrit :
>
>>
>>     * EOF in selector mode should be a parse error (a {} block is missing)
>>     * EOF in at-rule prelude should be like ';'. A parse error for
>>     declarations-filled or rule-filled at-rules, but not for other
>> at-rules:
>>
>>     data:text/html,<style>@import "data:text/css,body{__**
>> background:green"
>>
>>
>>     In the example above the @import rule is valid even though it ends
>>     with EOF rather than ';'
>>
>>
>> I would not agree this is valid. Rather, its operation depends on
>> interoperable error handling behavior.
>>
>
> Indeed, the above @import rule is invalid per the CSS 2.1 core grammar,
> but I believe that the "User agents must close all open constructs at the
> end of the style sheet." part of §4.1 should apply.
>

Agreed, but that doesn't mean that such a CSS style sheet fragment is valid.


>
> Error handling is a big part of what we’re trying to specify with
> css3-syntax. The point is to make it interoperable.


Oh, I definitely agree we want to do this. I'm a bit more concerned we get
the vague semantics of CSS2.1 §4.2 Malformed Declarations/Statements
corrected, especially w.r.t.

while observing the rules for matching pairs of (), [], {}, "", and '', and
> correctly handling escapes


G.

Received on Wednesday, 30 January 2013 03:32:16 UTC