]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fix comment placement, remove unecessary prop wrapper
authorMark Otto <markdotto@gmail.com>
Mon, 9 Jul 2018 00:29:01 +0000 (17:29 -0700)
committerMark Otto <markdotto@gmail.com>
Mon, 9 Jul 2018 00:29:01 +0000 (17:29 -0700)
scss/utilities/_spacing.scss

index 6191b9b9655265da9811b07b81dc7e35c1e58fac..c43387dec10484d04e7f7d83e43b0e0d490dfb84 100644 (file)
@@ -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} {
       }
     }
 
-    // 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;
+    // 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;
         }
-        .#{$abbrev}r#{$infix}-n#{$size},
-        .#{$abbrev}x#{$infix}-n#{$size} {
-          #{$prop}-right: -$length !important;
+        .mr#{$infix}-n#{$size},
+        .mx#{$infix}-n#{$size} {
+          margin-right: -$length !important;
         }
-        .#{$abbrev}b#{$infix}-n#{$size},
-        .#{$abbrev}y#{$infix}-n#{$size} {
-          #{$prop}-bottom: -$length !important;
+        .mb#{$infix}-n#{$size},
+        .my#{$infix}-n#{$size} {
+          margin-bottom: -$length !important;
         }
-        .#{$abbrev}l#{$infix}-n#{$size},
-        .#{$abbrev}x#{$infix}-n#{$size} {
-          #{$prop}-left: -$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,
     .my#{$infix}-auto {