0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-06 04:08:22 +01:00

fix comment placement, remove unecessary prop wrapper

This commit is contained in:
Mark Otto 2018-07-08 17:29:01 -07:00
parent 0153f7d8cd
commit 7e96979cea

View File

@ -8,7 +8,6 @@
@each $prop, $abbrev in (margin: m, padding: p) { @each $prop, $abbrev in (margin: m, padding: p) {
@each $size, $length in $spacers { @each $size, $length in $spacers {
.#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; } .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
.#{$abbrev}t#{$infix}-#{$size}, .#{$abbrev}t#{$infix}-#{$size},
.#{$abbrev}y#{$infix}-#{$size} { .#{$abbrev}y#{$infix}-#{$size} {
@ -29,32 +28,30 @@
} }
} }
// Some special margin utils // Negative margins (e.g., where `.mb-n1` is negative version of `.mb-1`)
@each $size, $length in $spacers {
// Negative margins i.e. mb-n1 is the inverse or negative of mb-1 @if not $size == 0 {
@each $prop, $abbrev in (margin: m) { .m#{$infix}-n#{$size} { margin: -$length !important; }
@each $size, $length in $spacers { .mt#{$infix}-n#{$size},
.my#{$infix}-n#{$size} {
.#{$abbrev}#{$infix}-n#{$size} { #{$prop}: -$length !important; } margin-top: -$length !important;
.#{$abbrev}t#{$infix}-n#{$size},
.#{$abbrev}y#{$infix}-n#{$size} {
#{$prop}-top: -$length !important;
} }
.#{$abbrev}r#{$infix}-n#{$size}, .mr#{$infix}-n#{$size},
.#{$abbrev}x#{$infix}-n#{$size} { .mx#{$infix}-n#{$size} {
#{$prop}-right: -$length !important; margin-right: -$length !important;
} }
.#{$abbrev}b#{$infix}-n#{$size}, .mb#{$infix}-n#{$size},
.#{$abbrev}y#{$infix}-n#{$size} { .my#{$infix}-n#{$size} {
#{$prop}-bottom: -$length !important; margin-bottom: -$length !important;
} }
.#{$abbrev}l#{$infix}-n#{$size}, .ml#{$infix}-n#{$size},
.#{$abbrev}x#{$infix}-n#{$size} { .mx#{$infix}-n#{$size} {
#{$prop}-left: -$length !important; margin-left: -$length !important;
} }
} }
} }
// Some special margin utils
.m#{$infix}-auto { margin: auto !important; } .m#{$infix}-auto { margin: auto !important; }
.mt#{$infix}-auto, .mt#{$infix}-auto,
.my#{$infix}-auto { .my#{$infix}-auto {