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

Le 30/01/2013 04:36, Tab Atkins Jr. a écrit :
> On Tue, Jan 29, 2013 at 7:31 PM, Glenn Adams<glenn@skynav.com>  wrote:
>> On Tue, Jan 29, 2013 at 4:36 PM, Simon Sapin<simon.sapin@kozea.fr>  wrote:
>>> 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.
> Validity is irrelevant.  We just care about behavior.

We can always have the spec say "this is a parse error" (so that 
validators report it) and then still append the at-rule to its its 
parent. We already do something similar for EOF in quoted strings.

But I’m not sure we should. Making this valid would be consistent with 
declarations: a semicolon ends a declaration but is not required if 
there is another end marker. (Namely: EOF or } for a parent {} block.)

-- 
Simon Sapin

Received on Wednesday, 30 January 2013 06:58:02 UTC