aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss')
-rw-r--r--vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss40
1 files changed, 25 insertions, 15 deletions
diff --git a/vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss b/vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss
index 8e291f7ae..191fb5650 100644
--- a/vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss
+++ b/vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss
@@ -15,12 +15,15 @@
@each $breakpoint in map-keys($breakpoints) {
$infix: breakpoint-infix($breakpoint, $breakpoints);
- // Allow columns to stretch full width below their breakpoints
- @for $i from 1 through $columns {
- .col#{$infix}-#{$i} {
- @extend %grid-column;
+ @if $columns > 0 {
+ // Allow columns to stretch full width below their breakpoints
+ @for $i from 1 through $columns {
+ .col#{$infix}-#{$i} {
+ @extend %grid-column;
+ }
}
}
+
.col#{$infix},
.col#{$infix}-auto {
@extend %grid-column;
@@ -31,12 +34,15 @@
.col#{$infix} {
flex-basis: 0;
flex-grow: 1;
+ min-width: 0; // See https://github.com/twbs/bootstrap/issues/25410
max-width: 100%;
}
- @for $i from 1 through $grid-row-columns {
- .row-cols#{$infix}-#{$i} {
- @include row-cols($i);
+ @if $grid-row-columns > 0 {
+ @for $i from 1 through $grid-row-columns {
+ .row-cols#{$infix}-#{$i} {
+ @include row-cols($i);
+ }
}
}
@@ -44,9 +50,11 @@
@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);
+ }
}
}
@@ -58,11 +66,13 @@
.order#{$infix}-#{$i} { order: $i; }
}
- // `$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);
+ @if $columns > 0 {
+ // `$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);
+ }
}
}
}