0

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 ?

1 Answers1

1

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.

ScottS
  • 71,703
  • 13
  • 126
  • 146
  • I've searched a lot about a Web Essentials/VS custom code formatting and there's absolutely no such thing... which is too bad, but hopefully with 2013 versions of both, it would be more flexible. Thank you for replying :) – Aleksandar Ivanov Nov 07 '13 at 15:01