0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Negative Margins classes for custom col gutters

Feature request #26681
This commit is contained in:
Ryan Worth 2018-06-07 16:39:58 +10:00 committed by GitHub
parent 9c3146d0dd
commit a2920149f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,31 @@
}
// Some special margin utils
// Negative margins i.e. mb-n1 is the inverse or negative of mb-1
@each $prop, $abbrev in (margin: m) {
@each $size, $length in $spacers {
.#{$abbrev}#{$infix}-n#{$size} { #{$prop}: -$length !important; }
.#{$abbrev}t#{$infix}-n#{$size},
.#{$abbrev}y#{$infix}-n#{$size} {
#{$prop}-top: -$length !important;
}
.#{$abbrev}r#{$infix}-n#{$size},
.#{$abbrev}x#{$infix}-n#{$size} {
#{$prop}-right: -$length !important;
}
.#{$abbrev}b#{$infix}-n#{$size},
.#{$abbrev}y#{$infix}-n#{$size} {
#{$prop}-bottom: -$length !important;
}
.#{$abbrev}l#{$infix}-n#{$size},
.#{$abbrev}x#{$infix}-n#{$size} {
#{$prop}-left: -$length !important;
}
}
}
.m#{$infix}-auto { margin: auto !important; }
.mt#{$infix}-auto,
.my#{$infix}-auto {