W3C home > Mailing lists > Public > www-style@w3.org > May 2009

Re: [CSS 2.1] Parsing unexpected atkeywords

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 20 May 2009 07:03:23 -0700
Message-ID: <4A140DAB.9040007@inkedblade.net>
To: Bert Bos <bert@w3.org>
CC: W3C style mailing list <www-style@w3.org>
Bert Bos wrote:
> The former case would be something like this:
>     div { @here {is something strange} color: red }
> The question is if the same rule applies. Is the parser parsing a 
> declaration when it sees the "@here"? If yes, the rule says that 
> everything up to and including "red" is ignored.
> I would say yes. At least I think that is the intention of the rule. The 
> rule contains an example ("For example, a malformed declaration may be 
> missing a property [...]"), which indicates that the parser is already 
> parsing a declaration, even if it hasn't yet seen a property.
> * Conclusion
> So my conclusion is that issue 71 is already covered by the "malformed 
> declarations" rule in section 4.2. No changes are necessary in 
> principle.
> But the existence of the issue seems to indicate that the rule is not 
> clear, so maybe an example can be added. The following could be added 
> as the eighth and ninth examples:
>     p { color: green; @foo color: red} /* unexpected token @foo */
>     p { color: red; @foo; color: green} /* unexpected token @foo */
> * Implementation status
> A quick check indicates that Konqueror, Opera and Firefox correctly 
> apply the "malformed declarations" rule. I haven't tested any other 
> software. But given that the current formulation has been unchanged 
> since 2003, I expect few problems.
> [1] http://wiki.csswg.org/spec/css2.1#issue-71

Bert, the issue has a resolution already, and the resolution was to
change the parsing behavior to be forwards-compatible with the CSS3
@page rule. The current text, as you say, would parse an at-rule
inside a declaration block as part of a declaration, and for CSS3
@page we need it to parse as an at-rule.

Received on Wednesday, 20 May 2009 14:04:44 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:26 UTC