How to do a .less mixin that generates something of a grid in css?
问题 I want to generate a matrix of css selector in the form of .cX.rY selectors for a grid of something like 10 x 10. But I'm not seeing how I can do this less (I'm pretty new to .less). I'm using DotLess too, so perhaps there are some built-in limitations with that; I don't know for sure on that front. @col-width: -24px; @row-width: -24px; .img-pos(@col, @row) { background-position: (((@col - 1) * @col-width) - 1) (((@row - 1) * @row-width) - 1); } .c2.r1 { .img-pos(2, 1); } .c2.r2 { .img-pos(2,