lessphp
lessphp copied to clipboard
recursive mixin not working in nested rule
Input:
.nested-class(4);
.nested-class(@n, @i: 1) when (@i =< @n) {
.class {
.nested-class(@n, (@i + 1));
width: (@i * 100% / @n);
}
}
Expected output:
.class {
width: 25%;
}
.class .class {
width: 50%;
}
.class .class .class {
width: 75%;
}
.class .class .class .class {
width: 100%;
}
Wrong output of lessphp:
.class {
width: 16.666666666667%;
}
.class .class {
width: 33.333333333333%;
}