diff options
| author | Catalin Zalog <[email protected]> | 2020-04-18 12:51:50 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-04-18 11:51:50 +0200 |
| commit | 338ca8382187ecf9cd7c4c1f63c28f7853330c2d (patch) | |
| tree | 3984072d10dce8c0227b4073425fb7dab875e9d0 | |
| parent | b79e55fed4740bc679e97d22b62a383885d16642 (diff) | |
| download | bootstrap-338ca8382187ecf9cd7c4c1f63c28f7853330c2d.tar.xz bootstrap-338ca8382187ecf9cd7c4c1f63c28f7853330c2d.zip | |
grid: checks for `$grid-columns > 0` (#30605)
Co-authored-by: Martijn Cuppens <[email protected]>
| -rw-r--r-- | scss/mixins/_grid.scss | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/scss/mixins/_grid.scss b/scss/mixins/_grid.scss index 94bf98a02..840cd6e0b 100644 --- a/scss/mixins/_grid.scss +++ b/scss/mixins/_grid.scss @@ -85,17 +85,19 @@ @include make-col-auto(); } - @for $i from 1 through $columns { - .col#{$infix}-#{$i} { - @include make-col($i, $columns); + @if $columns > 0 { + @for $i from 1 through $columns { + .col#{$infix}-#{$i} { + @include make-col($i, $columns); + } } - } - // `$columns - 1` because offsetting by the width of an entire row isn't possible - @for $i from 0 through ($columns - 1) { - @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0 - .offset#{$infix}-#{$i} { - @include make-col-offset($i, $columns); + // `$columns - 1` because offsetting by the width of an entire row isn't possible + @for $i from 0 through ($columns - 1) { + @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0 + .offset#{$infix}-#{$i} { + @include make-col-offset($i, $columns); + } } } } |
