W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: Comment syntax

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Tue, 28 Aug 2012 00:08:27 +0200
Message-Id: <97008BCD-3A7E-4D22-8EDD-BF0FB698F120@crissov.de>
To: www-style list <www-style@w3.org>
Jens O. Meiert (2012-08-22):

> are there any plans to extend CSS’s comment syntax?

Did you have anything else in mind? Incorporating something like “CSSdoc”?

With comments you have to consider two major use cases: documentation and debugging.

> Like, allowing one-line comments via e.g. “//”?

I assume it was a deliberate design decision to only support start-end comments in CSS1. It was not a bad one either. Code lines are irrelevant for everything else in CSS (except ‘@charset’ maybe) and it is sometimes complicated, already, to define where a comment should be valid to start and end.

It would be possible, though, to define a special character, (possibly very short) keyword or prefix for at-rules, selectors, simple selectors, properties or values (or all of them) that was guaranteed to make the select part invalid. You could rely on existing syntax restrictions for that, of course, but maybe it would make sense to explicitly introduce such structural disablers. That wouldn’t be used for documentation, though.
Received on Monday, 27 August 2012 22:08:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:20 UTC