diff --git a/sass/_config/_variables.scss b/sass/_config/_variables.scss index ec2c96d..e473adb 100644 --- a/sass/_config/_variables.scss +++ b/sass/_config/_variables.scss @@ -79,6 +79,9 @@ $hyphens: false !default; // Spacing zone // ------------ +// Number of grid-columns +$cols: 12; + // Grid gutters (for .has-gutter-* classes) $grid-gutters: ( '': 1rem, diff --git a/sass/_library/grillade-flex.scss b/sass/_library/grillade-flex.scss index 6bcb9c6..7f928eb 100644 --- a/sass/_library/grillade-flex.scss +++ b/sass/_library/grillade-flex.scss @@ -84,7 +84,7 @@ $iefix: 0.01px; } // Constructing grids : will be compiled in CSS @media (min-width: $small) { - @for $i from 2 through 12 { + @for $i from 2 through $cols { [class*="grid-#{$i}"] { @include grid(#{$i}, 0); } diff --git a/sass/_library/grillade-grid.scss b/sass/_library/grillade-grid.scss index f205a31..7f27cb9 100644 --- a/sass/_library/grillade-grid.scss +++ b/sass/_library/grillade-grid.scss @@ -56,15 +56,15 @@ $medium: 768px !default; } } -// grid constructor (.grid-2 to .grid-12) -@for $i from 2 through 12 { +// grid constructor (.grid-2 to .grid-$cols) +@for $i from 2 through $cols { [class*="grid-#{$i}"] { grid-template-columns: repeat(#{$i}, 1fr); } } -// grid items constructor (.col-1 to .col-12, .row-1 to .row-12) -@for $i from 1 through 12 { +// grid items constructor (.col-1 to .col-$cols, .row-1 to .row-$cols) +@for $i from 1 through $cols { [class*="col-#{$i}"] { grid-column: auto / span #{$i}; }