Pregunta

I'm using version 3.0 of the Web Essentials for VS2012 and I'm experiencing an issue trying to create a new style based on the styling applied to another existing style in a separate CSS file (in the same directory).

At the top of the LESS file I'm doing a:

@import "bootstrap.css";

Assuming my understanding of mixins is correct, every CSS style is effectively a mixin and according to the LESS guidance, all the styling of one style can be applied to another straightforwardly like so:

.input-validation-error {
    .has-error;
}

However, web essentials red-squiggly-underlines my .has-error; style and won't compile the LESS file into CSS. When I hover over the error is states:

Undeclared mixin
¿Fue útil?

Solución

Web Essentials doesn't appear to compile mixins etc in from CSS files, only LESS files. I found I had to include the original bootstrap.less files, like so:

@import "../../Bootstrap/less/bootstrap.less";

Obviously your path might be different!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top