I am using less for the first time and I am having some problems. It's a MVC project and I'm using dotless and System.Web.Optimization.Less .
I have registered a bundle to include all my files less and return a single minimized file to the browser.
bundles.Add(new StyleBundle("~/Content/Less").Include(
"~/Styles/Layout/Colores.less",
"~/Styles/Layout/Global.less"));
As you can see, I am including a color file that contains the variables that define them, so that they can be used later in the rest of the project's less files. I also include a file to define the global style of the application that uses these variables ..
But when I go with the browser to the page, the less generated file contains the following error:
/* Minification failed. Returning unminified contents.
(54,12): run-time error CSS1036: Expected expression, found '@colorBlanco'
(83,15): run-time error CSS1035: Expected colon, found ';'
*/
My Color.less file has the following content:
@colorGris: #808080;
@colorBlanco: #FFFFFF;
/*Bordes*/
@colorBordeInput: #b1b1b1;
@colorBordeContainer: #E9EAEC;
/*Sombras*/
@colorSombraInput: #a5a5a5;
@colorSombraFocusInput: #81005D;
/*******************
**** Layout ****
*******************/
/* userDataLine */
@colorNombreUsuario: #700056;
What is the problem? If I see the file global.css file that is automatically generated in Visual Studio if I see that the variable has been changed by its corresponding value, for example:
#whereIAm #titleAndPath span {
color: #ffffff;
}
Thank you!