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

Re: [CSS 2.1] Parsing unexpected atkeywords

From: Bert Bos <bert@w3.org>
Date: Wed, 20 May 2009 18:06:48 +0200
To: W3C style mailing list <www-style@w3.org>
Message-Id: <200905201806.48824.bert@w3.org>
On Wednesday 20 May 2009, fantasai wrote:
> 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.

Yes, I know it has a resolution. This is my action to propose text to 
implement that resolution. But it describes two cases which turn out to 
be both special cases of an already existing rule. So I think no text 
is needed and my action is done.

I'm not quite sure how this came to be an action for me. I think it was 
a resolution for Paged Media and it was resolved this way precisely 
because CSS 2.1 already did it this way. We wanted implementations of 
the Paged Media CR of 2004 to change as little as possible and not add 
new syntax (although I still think we *should* change the syntax, while 
we still can). Thus margin boxes continue to be inside @page, but only 
those at the end are taken into account.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Wednesday, 20 May 2009 16:07:25 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:18 GMT