Re: [CSS21] minor issue: location of comment tokens

On Tuesday 25 November 2008 16:40, L. David Baron wrote:
> On Tuesday 2008-11-25 14:39 +0100, Bert Bos wrote:
> > I propose to simply remove the offending phrase. In other words,
> > change in section 4.1.1 (Tokenization) the phrase:
> >
> >     may appear anywhere between other tokens
> > to
> >     may appear anywhere
> >
> > I believe this is editorial. (The phrase "between other tokens" was
> > added in 1998, when we weren't as careful with the language as we
> > are now...)
>
> We might still want to make it clear in the prose that a comment
> can't appear in the middle of a token without causing it to be two
> tokens.  Otherwise people might think you can do:
>
> p { background-/*not foreground*/color: green; }
>
> which doesn't actually work.

In that case we'll have to make the text longer instead of shorter :-( 
How about the following? In 4.1[1], after

    COMMENT tokens do not occur in the grammar (to keep it readable),
    but any number of these tokens may appear anywhere between other
    tokens

add this phrase and note:

    or at the start or end of a style sheet. (Note, however, that
    a comment before @charset[2] disables the @charset.)

[1] http://www.w3.org/TR/2007/CR-CSS21-20070719/syndata.html#syntax
[2] http://www.w3.org/TR/2007/CR-CSS21-20070719/syndata.html#charset



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 Thursday, 27 November 2008 16:01:01 UTC