1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-03 02:13:01 +02:00

Switch to custom properties to control grid gutter widths (#30475)

This commit is contained in:
Martijn Cuppens
2020-03-30 15:12:36 +02:00
committed by GitHub
parent e1f5d819c7
commit 8414126266
3 changed files with 24 additions and 38 deletions

View File

@@ -12,40 +12,6 @@
}
}
// Gutters
//
// Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
@if $enable-grid-classes {
@each $breakpoint in map-keys($grid-breakpoints) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@include media-breakpoint-up($breakpoint, $grid-breakpoints) {
@each $key, $value in $gutters {
.g#{$infix}-#{$key},
.gx#{$infix}-#{$key} {
margin-right: -$value / 2;
margin-left: -$value / 2;
> * {
padding-right: $value / 2;
padding-left: $value / 2;
}
}
.g#{$infix}-#{$key},
.gy#{$infix}-#{$key} {
margin-top: -$value;
> * {
margin-top: $value;
}
}
}
}
}
}
// Columns
//