From 60dfa8a7727952c7e0badd050d5e7a3c4dad6f8b Mon Sep 17 00:00:00 2001 From: ml-uni <43490189+ml-uni@users.noreply.github.com> Date: Mon, 24 Sep 2018 09:07:25 +0200 Subject: [PATCH 1/4] Adding cols number variable for grid system --- sass/_config/_variables.scss | 3 +++ 1 file changed, 3 insertions(+) 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, From 98d49f1f584e9d50e0b84791602c4ac61e0aae07 Mon Sep 17 00:00:00 2001 From: ml-uni <43490189+ml-uni@users.noreply.github.com> Date: Mon, 24 Sep 2018 09:14:03 +0200 Subject: [PATCH 2/4] Add $cols to grid system --- sass/_library/grillade-grid.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sass/_library/grillade-grid.scss b/sass/_library/grillade-grid.scss index f205a31..8a87829 100644 --- a/sass/_library/grillade-grid.scss +++ b/sass/_library/grillade-grid.scss @@ -57,14 +57,14 @@ $medium: 768px !default; } // grid constructor (.grid-2 to .grid-12) -@for $i from 2 through 12 { +@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}; } From 62a36ee160f5e6ca898e120c3c93756869d55665 Mon Sep 17 00:00:00 2001 From: ml-uni <43490189+ml-uni@users.noreply.github.com> Date: Mon, 24 Sep 2018 09:18:37 +0200 Subject: [PATCH 3/4] Add $cols for grillade-flex --- sass/_library/grillade-flex.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } From e3d7ba689fe291ce1209dff4e1b08ffa3378ff55 Mon Sep 17 00:00:00 2001 From: ml-uni <43490189+ml-uni@users.noreply.github.com> Date: Mon, 24 Sep 2018 09:22:43 +0200 Subject: [PATCH 4/4] Change comment for grid number --- sass/_library/grillade-grid.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sass/_library/grillade-grid.scss b/sass/_library/grillade-grid.scss index 8a87829..7f27cb9 100644 --- a/sass/_library/grillade-grid.scss +++ b/sass/_library/grillade-grid.scss @@ -56,7 +56,7 @@ $medium: 768px !default; } } -// grid constructor (.grid-2 to .grid-12) +// grid constructor (.grid-2 to .grid-$cols) @for $i from 2 through $cols { [class*="grid-#{$i}"] { grid-template-columns: repeat(#{$i}, 1fr);