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

Re: Comment syntax

From: Zachary “Gamer_Z.” Yaro <zmyaro@gmail.com>
Date: Sat, 25 Aug 2012 23:10:03 -0400
Message-ID: <CANFzyvJWRnvncWyKJ2LZc37WaDX9nTTA_VKKSAGOkp5VKxRY=w@mail.gmail.com>
To: liam@w3.org
Cc: "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com>, WWW Style <www-style@w3.org>, "Jens O. Meiert" <jens@meiert.com>
I still do not quite see why the existence of minifiers matters here at
all.  Devs who use minifiers could just choose not to use // comments (and
minifiers would likely update to support them if they became standard).

Regarding HTML attributes, is there a reason the treatment of CSS //
comments in style attributes could not be the same as JavaScript //
comments in event attributes?

—Zachary “Gamer_Z.” Yaro
On Aug 25, 2012 9:36 AM, "Liam R E Quin" <liam@w3.org> wrote:

> On Sat, 2012-08-25 at 01:20 -0400, Zachary “Gamer_Z.” Yaro wrote:
> > Just my 2¢, but how is that different from JavaScript, which can also be
> > added in HTML attributes and also has minimization tools?
>
> When the minimization tools were written for JavaScript, JavaScript
> already had comments that ran to the end of the line, so people writing
> tools had to allow for it.
>
> CSS did (does) not have comments that go to a newline, so today it's
> safe to turn newlines into spaces.
>
> Liam
>
> --
> Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
> Pictures from old books: http://fromoldbooks.org/
> The barefoot typographer - http://www.holoweb.net/~liam/
> Co-author <http://www.holoweb.net/~liam/Co-author>, 5th edition of
> "Beginning XML" - Wiley, July 2012
>
>
Received on Sunday, 26 August 2012 12:18:53 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:58 GMT