Currently I'm using the Less code below to create the defaults for my grid elements:
.create-grid-elements(@n, @i: 1) when (@i =< @n) {
.grid_@{i} {
position: relative;
display:inline;
float: left;
margin-left: 1%;
margin-right: 1%;
}
.create-grid-elements(@n, @i+1);
}
.create-grid-elements(16);
which outputs:
.grid_1 {
...
}
.grid_2 {
...
}
...
.grid_16 {
...
}
For the sake of debugging using browser dev tools, is there a way to tweak the loop (or write a new loop) such that instead of writing multiple independent selectors for the grid, it instead writes one selector that is comma separated like this?
.grid_1, .grid_2, ... , .grid_16 {
...
}
Thanks!!