this code work well:
#ns {
.nsmixin(@color){
color: @color;
}
}
.mixin()
{
.test2 {
#ns > .nsmixin(blue);
}
}
.mixin();
Then i create a file ns.less which contains:
.nsmixin(@color){
color: @color;
}
now the code below shows an error:
#ns { @import "ns.less";}
.mixin()
{
.test2 {
#ns > .nsmixin(blue);
}
}
.mixin()
error: "SyntaxError: #ns > .nsmixin is undefined" this only happens when its wrapped inside a mixin. Use the namespace in a class works well too:
#ns { @import "ns.less";}
.test2 {
#ns > .nsmixin(blue);
}