Lately I discovered LESS and started loving and using it. In combination with Twitter’s Bootstrap it become very easy to generate CSS in a very comfortable way.
At one point I needed to generate roughly 30 css classes to leverage CSS sprites. I’ve been used do this all by hand back when CSS was written without any help, but having such awesome tools like LESS there must be a way to do this more comfortable. After searching for a while various sources (and also the LESS documentation) said that there are no loops in LESS, so I looked through the Bootstrap sources I found some stuff that looked similar to loops (grid.less and mixins.less).
After simplifying what I found here is the shortest version of doing a loop-like construct in LESS: continue reading…
