Answer the question
In order to leave comments, you need to log in
Is it possible in LESS to call a mixin whose name is in a variable?
Is it possible to "execute" a mixin through a variable?
I would like something like this
.mixin {
/* ... */
}
@name: mixin;
.classname {
/* как-то так [email protected]{name} - не работает*/
}
.class1 {
.class2;
}
.mixin(@class1, @class2) {
[email protected]{class1} {
/* тут хочется как-то выполнить @class2 */
}
}
Answer the question
In order to leave comments, you need to log in
You can organize this using a set of rules (ruleset).
.mixin() {
color: red;
}
@name: {
.mixin();
};
.class {
@name();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question