0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-30 22:52:24 +01:00

grid: checks for $grid-columns > 0 (#30605)

Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
This commit is contained in:
Catalin Zalog 2020-04-18 12:51:50 +03:00 committed by GitHub
parent b79e55fed4
commit 338ca83821
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}
}
}