@columnWidth: 80px; @gutter: 5px; @allColumns: @columnWidth * 12; @allGutters: (@gutter * 12) * 2; @totalWidth: @allColumns + @allGutters; .theWidth (@theColumn: 1, @theGutter: 0) { width: (@columnWidth * @theColumn) + (@gutter * @theGutter); } .grid_1 { .theWidth(1,0); } .grid_2 { .theWidth(2,2); } .grid_3 { .theWidth(3,4); } .grid_4 { .theWidth(4,6); } .grid_5 { .theWidth(5,8); } .grid_6 { .theWidth(6,10); } .grid_7 { .theWidth(7,12); } .grid_8 { .theWidth(8,14); } .grid_9 { .theWidth(9,16); } .grid_10 { .theWidth(10,18); } .grid_11 { .theWidth(11,20); } .grid_12 { .theWidth(12,22); } .column { margin: 0 @gutter; overflow: hidden; float: left; display: inline; } .row { width: @totalWidth; margin: 0 auto; overflow: hidden; } .row .row { margin: 0 (@gutter * -1); width: auto; display: inline-block; }