diff options
| author | Mark Otto <[email protected]> | 2018-07-24 17:26:29 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2018-07-24 17:26:29 -0700 |
| commit | ba25e38b4ac454ea0ff3ff35ef9b6f9cf80b34af (patch) | |
| tree | 3f9a057ef736613443c7330e4b12184b4eac95a0 /scss | |
| parent | fb2de04374a068594c84c1ec6aba6b5b3726ed27 (diff) | |
| parent | b0b28c81e50bedff322b12c13707c97982b4d455 (diff) | |
| download | bootstrap-ba25e38b4ac454ea0ff3ff35ef9b6f9cf80b34af.tar.xz bootstrap-ba25e38b4ac454ea0ff3ff35ef9b6f9cf80b34af.zip | |
Merge branch 'garhbod-patch-1' into v4-dev
Diffstat (limited to 'scss')
| -rw-r--r-- | scss/utilities/_spacing.scss | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/scss/utilities/_spacing.scss b/scss/utilities/_spacing.scss index b2e2354b1..c43387dec 100644 --- a/scss/utilities/_spacing.scss +++ b/scss/utilities/_spacing.scss @@ -8,7 +8,6 @@ @each $prop, $abbrev in (margin: m, padding: p) { @each $size, $length in $spacers { - .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; } .#{$abbrev}t#{$infix}-#{$size}, .#{$abbrev}y#{$infix}-#{$size} { @@ -29,6 +28,29 @@ } } + // Negative margins (e.g., where `.mb-n1` is negative version of `.mb-1`) + @each $size, $length in $spacers { + @if not $size == 0 { + .m#{$infix}-n#{$size} { margin: -$length !important; } + .mt#{$infix}-n#{$size}, + .my#{$infix}-n#{$size} { + margin-top: -$length !important; + } + .mr#{$infix}-n#{$size}, + .mx#{$infix}-n#{$size} { + margin-right: -$length !important; + } + .mb#{$infix}-n#{$size}, + .my#{$infix}-n#{$size} { + margin-bottom: -$length !important; + } + .ml#{$infix}-n#{$size}, + .mx#{$infix}-n#{$size} { + margin-left: -$length !important; + } + } + } + // Some special margin utils .m#{$infix}-auto { margin: auto !important; } .mt#{$infix}-auto, |
