Re: Comments in CSS

Bert the origin of the problem is different

It is because of url() syntax:
LI { list-style: url(http://www.redballs.com/redball.png) disc }
Quotes are optional in url() and this prevents use of '//' as comment-start 
token.

Andrew Fedoniouk.
http://terrainformatica.com



----- Original Message ----- 
From: "Bert Bos" <bert@w3.org>
To: <www-style@w3.org>
Sent: Wednesday, December 07, 2005 11:51 AM
Subject: Re: Comments in CSS


|
| On Wednesday 07 December 2005 17:26, Anne van Kesteren wrote:
| > On Wed, 07 Dec 2005 17:11:37 +0100, Manuel Strehl
| >
| > <manuel.strehl@stud.uni-regensburg.de> wrote:
| > > So, if you'd like to test the CSS without, say, prop2 (cause you'd
| > > like to see what it's like, when the UA overrides your "color"
| > > property...), it would be really fine, if you could comment it out
| > > by just typing "//" rather than wrap it in "/*"..."*/":
| > >
| > > selector {
| > >   property1;
| > >   //property2;        much faster than /*property2*/
| > >   property3;
| > > }
| >
| > How about x-property2;? That would cause the rule to be dropped. Not
| > the same semantics, but you keep the effect. (I mostly just use x
| > without all the dashes, but this seems more appropriate.)
|
| I do the same as Anne.
|
| It is not possible to introduce "//" as a comment delimiter without
| changing the core grammar of CSS. CSS says that "//" consists of two
| tokens "/". Although we currently only have expressions with a single
| "/", it is possible to add some later that use "//".
|
| Back when the syntax of CSS was developed, it wasn't felt necessary to
| use "//" for comments, nor "#" for that matter. The latter was more
| useful for ID selectors and we thought the former would someday be used
| as a combinator (I forget whether it became '+', '>' or '~'). And
| anyway, we believed it was enough to have "/*...*/" comments plus the
| fact that incorrect properties/rules are ignored.
|
|
|
| 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, 7 December 2005 23:32:15 UTC