aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2018-07-08 16:46:44 -0700
committerMark Otto <[email protected]>2018-07-08 16:46:44 -0700
commitf6b4945f1e6d36bb25c03d128ae2c6fc28cffa55 (patch)
tree1974d6b2885a04b03b091c8bb1706b39c9723794
parentcfc9c85b322bc72b80c0d2398a65febe5bb875b6 (diff)
parenta2920149f43e80a411f2f2cf0dd43a84147a82b1 (diff)
downloadbootstrap-f6b4945f1e6d36bb25c03d128ae2c6fc28cffa55.tar.xz
bootstrap-f6b4945f1e6d36bb25c03d128ae2c6fc28cffa55.zip
Merge branch 'patch-1' of https://github.com/garhbod/bootstrap into garhbod-patch-1
-rw-r--r--scss/utilities/_spacing.scss25
1 files changed, 25 insertions, 0 deletions
diff --git a/scss/utilities/_spacing.scss b/scss/utilities/_spacing.scss
index b2e2354b1..6191b9b96 100644
--- a/scss/utilities/_spacing.scss
+++ b/scss/utilities/_spacing.scss
@@ -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 {