In my LESS project I am having issues getting my guarded mixins working with variables that I declared in another file. Here is the code I am working with:
_defaults.less (contains all of my variables)
//------------------------------------//
// @INCLUDE
//------------------------------------//
// Set whatever components you want included
// in your project to `true` and any components
// you do not wish to be included to `false`
// Base
@use-main: true;
_main.less (just a random partial in my project)
.main(@boolean) when (@boolean = true) {
// Styles go here
}
// Execute mixin
.main(@use-main);
style.less (imports all of my partials)
//------------------------------------//
// @IMPORTS
//------------------------------------//
// Base styles
@import "base/_main.less";
This is how my project is structured (for around 20 partials that are then imported into the style.less
file).
Whenever I try to compile my project, I get this error:
Unrecognised input
c:\Users\Keenan\Documents\GitHub\concise.css-less\less\base_main.less line 1
c:\Users\Keenan\Documents\GitHub\concise.css-less\less\concise.less