mrcrowl / vscode-easy-less

Easy LESS extension for Visual Studio Code
MIT License
67 stars 23 forks source link

Mixins undefined when in import file #100

Closed not-daniel-craig closed 11 months ago

not-daniel-craig commented 11 months ago

Hi,

I'm having an issue with EasyLess. Mixins declared in other files are not working in imported files.

My main.less file looks like this:

.red-box {background: red;}
div.left-box {
.red-box;
}
@import "mobile.less";

mobile.less looks like this:

div.center-box {
.red-box;
}

The mixin .red-box; will work in main.less but not in mobile.less. I'm getting the error ".red-box is undefined" (Error compiling less).

My code was working fine with Less​2​Css in Sublime Text. It's an old website that I'm fixing and I know the CSS / Less is valid.

Is there a way to bypass that validation error? Thank you for your help.