W
W
WhiteBearDev2019-05-25 10:47:26
Less
WhiteBearDev, 2019-05-25 10:47:26

Interpolation in Less. How to implement extend through a variable?

The essence of the question is this: a variable of the string type comes into the mixin. You need to call extend with the name of this variable. Example:

.mixin("extend");

.mixin(@variable){
   [email protected](); - вот здесь всё ломается :-(
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
forspamonly2, 2019-05-25
@forspamonly2

pass detached ruleset there with a direct call to the mixin.

.extend() {
  x:1;
}

.mixin(@variable){
  @variable();
}

x {
  .mixin({.extend()});
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question