In less, this:
.nav {
&_button {
outline: 1px solid red;
&-mod {
color: red;
}
}
}
Compiles to this:
.nav_button {
outline: 1px solid red;
}
.nav_button-mod {
color: red;
}
OK, but now I want to us .nav_button as mixin;
This fails with NameError: .nav_button is undefined
:
.nav {
&_button {
outline: 1px solid red;
&-mod {
.nav_button;
color: red;
}
}
}
This does not seems obvious too me, as well as I can not understand what is the less way to do this. So the question is - how can I invoke a class name with ampersand as a mixin?