Lines Matching refs:grid
1 // Framework grid generation
3 // Used only by Bootstrap to generate the correct number of grid classes given
4 // any value of `@grid-columns`.
6 .make-grid-columns() {
7 // Common styles for all sizes of grid columns, widths 1-12
12 .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
16 .col(@index, @list) when (@index > @grid-columns) { // terminal
22 padding-left: (@grid-gutter-width / 2);
23 padding-right: (@grid-gutter-width / 2);
29 .float-grid-columns(@class) {
34 .col(@index, @list) when (@index =< @grid-columns) { // general
38 .col(@index, @list) when (@index > @grid-columns) { // terminal
46 .calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
48 width: percentage((@index / @grid-columns));
51 .calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {
53 left: percentage((@index / @grid-columns));
56 .calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {
61 .calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {
63 right: percentage((@index / @grid-columns));
66 .calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {
71 .calc-grid-column(@index, @class, @type) when (@type = offset) {
73 margin-left: percentage((@index / @grid-columns));
78 .loop-grid-columns(@index, @class, @type) when (@index >= 0) {
79 .calc-grid-column(@index, @class, @type);
81 .loop-grid-columns((@index - 1), @class, @type);
84 // Create grid for specific class
85 .make-grid(@class) {
86 .float-grid-columns(@class);
87 .loop-grid-columns(@grid-columns, @class, width);
88 .loop-grid-columns(@grid-columns, @class, pull);
89 .loop-grid-columns(@grid-columns, @class, push);
90 .loop-grid-columns(@grid-columns, @class, offset);