It's not possible (as of Less 1.7.0) to match variables with extend. From the documentation:
Extend is NOT able to match selectors with variables. If selector contains variable, extend will ignore it.
Question
I made a mixi receive two parameters, which are actually two classes (.class-name)
I tried to extend this class with the & @ {param}. Despite the copilador not give error, the final css not extend the class.
Does anyone have any idea how to do this?
.make-icon-button(@extend, @icon){
&:extend(@{extend});
&:hover{
&:extend(@{extend}:hover);
}
&:after{
&:extend(.glyphicon);
&:extend(@{icon}:before);
}
}
.btn-pencil-right {
.make-icon-button('.btn-success', '.glyphicon-pencil');
.make-animation-slide-to-right();
}
Solution
It's not possible (as of Less 1.7.0) to match variables with extend. From the documentation:
Extend is NOT able to match selectors with variables. If selector contains variable, extend will ignore it.