Re: Single-line comments

On Apr 3, 2010, at 12:29 PM, François REMY wrote:

> The problem would then become very visible :
>  
> a {
>     // non-ok : value;
>     ok: value;
> }
>  
> <== UA Optimisation (discarding space chars after the first) ==>
> a { // non-ok : value; ok: value; }
> 

I was thinking more of editing software and less of, say, browsers. But maybe it would happen in some browsers too.

Also, similar situation is this:

DIV { property: value; }  // A div rule 
A { i-want-to-be-parsed: also } 
 
/* white space collapsed: */
DIV { property: value; }  // A div rule A { i-want-to-be-parsed: also }

> I don't expect developers to be able to use single-line comments immediately -- they will obviously only be usable when all browsers in use support them. 

This is different from not supporting a particular property. If using a comment in a style-sheet causes other rules or declarations to be unexpectedly (and somewhat unpredictably) dropped when parsed in earlier software, that is a pretty bad thing.

Received on Saturday, 3 April 2010 20:41:42 UTC