Question

I use Web Essentials 2012 in VS 2012.

When I compile LESS file with content like that:

/* HEADER */



.header{
    background: red;
}



/* FOOTER */



.footer{
    background: black;
}

...to CSS file, the outcome is this:

/* HEADER */
.header{
    background: red;
}
/* FOOTER */
.footer{
    background: black;
}

Is there an option "Keep original formatting" or set of option with which I could keep the original formatting ?

Was it helpful?

Solution

Sort of...

If your main desire is to keep the "gap" between the comment and the style for easier visual recognition, then in most cases this should work (unless perhaps you minify the code), because within the comment it will preserve the formatting of the empty lines down to the new position of the end comment marker */:

/* FOOTER *


*/
.footer{
    background: black;
}

That's about as close as you can get. Note: I have not actually tested this with Web Essentials, just on the less2css.org compiler.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top