将mixin作为mix in param in LESS

时间:2015-10-10 11:12:13

标签: css css3 less

我有以下mixin:

.image-ui-wave-pos (@num, @selected:0) when (@selected = 0) {
    background-position: -(@image-ui-wave-width * @num) -28px;
}

我想将它作为参数传递给以下mixin:

.small-button (@pos-macro, @buttons, @i) when (@i > 0) {
    @button: extract(@buttons, @i);

    &.@{button} {
        .pos-macro (@i);
    }

    .small-button(@pos-macro, @buttons, @i - 1);
}

作为参数@ pos-macro调用它如下:

.small-button (.image-ui-wave-pos, @wave-buttons);

但它没有编译。怎么做?

0 个答案:

没有答案