Tutorial by Examples

Usage of loops is an excellent way to keep the code DRY and avoid repetition. Unlike in Sass, there are no built-in @for or @each directive in Less for writing loops but it can still be written using recursive mixins. A recursive mixin is nothing but a mixin which keeps calling itself. There are fo...
A for-each loop in Less has the same key components as a for loop except for the following differences: A variable which contains the list of items that has to be iterated over. An extract() function to extract each item in the variable based on the loop's index. A length() function to calculat...

Page 1 of 1