Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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)

CSS
//------------------------------------//
//  @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)

CSS
.main(@boolean) when (@boolean = true) {
    // Styles go here
}

// Execute mixin
.main(@use-main);


style.less (imports all of my partials)

CSS
//------------------------------------//
//  @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\project\less\base\_main.less line 1
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900