diff --git a/tests/inputs/mixin_recursive.less b/tests/inputs/mixin_recursive.less new file mode 100644 index 00000000..727222ba --- /dev/null +++ b/tests/inputs/mixin_recursive.less @@ -0,0 +1,15 @@ +// This test for mixin recursion (loops). + +.bg(@filename) +{ + background-image: url('@{filename}'); +} + +.generate_nav(@n; @i: 1) when (@i =< @n) { + #but@{i} { + .bg('@{i}.png'); + } + .generate_nav(@n; (@i+1)); +} + +.generate_nav(5); diff --git a/tests/outputs/mixin_recursive.css b/tests/outputs/mixin_recursive.css new file mode 100644 index 00000000..d8c1c382 --- /dev/null +++ b/tests/outputs/mixin_recursive.css @@ -0,0 +1,15 @@ +#but1 { + background-image: url('1.png'); +} +#but2 { + background-image: url('2.png'); +} +#but3 { + background-image: url('3.png'); +} +#but4 { + background-image: url('4.png'); +} +#but5 { + background-image: url('5.png'); +}