- From: Matthew Brealey <thelawnet@yahoo.com>
- Date: Mon, 13 Dec 1999 07:02:04 -0800 (PST)
- To: www-style <www-style@w3.org>
--- Bill dehOra <Wdehora@cromwellmedia.co.uk> wrote: > > : Given that > : P {colour: red /* comment */} > : isn't valid, should the declaration (i.e., > color: red) > : be ignored as invalid? > > > If you are referring to the comment placement, why > isn't this valid? A > comment can appear anywhere between tokens; here it > appears between > <whitespace> and a <}>, which are both tokens (in > CSS2 at least). No no no. When you refer to <whitespace>, I presume you mean the S token. However, } isn't a token at all. Here's the definition of ruleset : selector [ ',' S* selector ]* '{' S* declaration [ ';' S* declaration ]* '}' S* ; ruleset isn't a token - tokens are indicated by uppercase. E.g., the following is: P {color: red } one IDENT token, a { character, an IDENT token, a : character, a S token, an IDENT token, a S token and a } character. Since the comment wouldn't be between tokens, P {color: red /* comment */} isn't valid, but P {color: red /* comment */ } is. > > From the CSS2 recc: 'COMMENT tokens do not occur in > the grammar (to keep it > readable), but any number of these tokens may appear > anywhere between other > tokens'. > AFAIT, there is nothing in the recc to rule > out nested comments. It does say that at: <q cite="http://www.w3.org/TR/REC-CSS2/syndata.html#comments"> Comments may not be nested. </q> ===== ---------------------------------------------------------- From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS)) __________________________________________________ Do You Yahoo!? Thousands of Stores. Millions of Products. All in one place. Yahoo! Shopping: http://shopping.yahoo.com
Received on Monday, 13 December 1999 10:08:52 UTC