W3C home > Mailing lists > Public > www-style@w3.org > November 2008

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 27 Nov 2008 11:54:15 -0800
Message-ID: <492EFAE7.6010207@inkedblade.net>
To: Bert Bos <bert@w3.org>
CC: W3C style mailing list <www-style@w3.org>

Bert Bos wrote:
> 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.)

"disable" isn't quite the right word. The @charset is invalid (and therefore
the stylesheet is invalid) if a comment appears either before or within the
@charset statement. You need a normative exception

   EXCEPT they may not appear before or within an @charset statement.

~fantasai
Received on Thursday, 27 November 2008 19:54:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:17 GMT