Question

Simple example: if I write in less-file so:

h1 {
  color: #25d14d;
 }

in css I get:

h1 {
   color: #25d14d;
   }

But if I write:

@color: #25d14d;
 h1 {
   color: @color;
 }

I get:

/*
   Compile Error. 
   See error list for details
*/

I've read a lot of information, but none of those solutions helped.

I reset my VS 2012, reset Web Essentials, installed ASP.NET and Web Tools 2012.2. and ... nothing changed.

I am in despair... How to get to work LESS with Web Essentials in VS 2012?

Was it helpful?

Solution

You can try the following workaround - start your .less file with valid CSS code, for example

h1 {}

and below put your LESS code:

@color: #25d14d;
 h1 {
   color: @color;
 }

I've faced the same problem and that helped me unexpectedly.

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