I have a problem with variables declared with other variable name. In the below mixin I have a variable declared with other variable name like:
.label-color(@color) {
@label-class:~"label-@{color}";
@badge-class:~"badge-@{color}";
@label-color:@@label-class;
.@{label-class}, .@{badge-class} {
background-color:@label-color !important;
}
}
.label-arrow(@color) {
@label-class:~"label-@{color}";
@label-color:@@label-class;
.@{label-class}{
&.arrowed:before {
border-right-color:@label-color;
}
&.arrowed-in:before {
border-color:@label-color;
}
&.arrowed-right:after {
border-left-color:@label-color;
}
&.arrowed-in-right:after {
border-color:@label-color;
}
}
}
Unfortunately my compiler does not recognize this kind of @label-color:@@label-class; and pull out error at this line.
What modification should I do in order to compile well this part of my less.
@@(btw., which one is it? I thought they all do) there's not much you can do except changing the compiler. Theoretically it is possible to rewrite anything w/o@@but we need to see all involved code (in particular how, where and more important why these@label-[color]variables are defined that way).@@. What error message do you get and what less4j version it is?