aboutsummaryrefslogtreecommitdiff
path: root/scss
diff options
context:
space:
mode:
authorStarsam80 <[email protected]>2017-03-05 14:07:38 -0700
committerMark Otto <[email protected]>2017-03-05 16:05:12 -0600
commit95f37e4c402df37db16781995ffa1592032df9c8 (patch)
tree1c7bf09f3b0bb90ea369759b81fca58febb4bdd3 /scss
parent9a93671b75dda49421cb20e43eaa7281ceac61b0 (diff)
downloadbootstrap-95f37e4c402df37db16781995ffa1592032df9c8.tar.xz
bootstrap-95f37e4c402df37db16781995ffa1592032df9c8.zip
Clean up spacers a bit more
Diffstat (limited to 'scss')
-rw-r--r--scss/_variables.scss30
-rw-r--r--scss/utilities/_spacing.scss22
2 files changed, 16 insertions, 36 deletions
diff --git a/scss/_variables.scss b/scss/_variables.scss
index 9a95602b7..4d7cd9dc9 100644
--- a/scss/_variables.scss
+++ b/scss/_variables.scss
@@ -140,30 +140,12 @@ $enable-print-styles: true !default;
$spacer: 1rem !default;
$spacers: (
- 0: (
- x: 0,
- y: 0
- ),
- 1: (
- x: ($spacer * .25),
- y: ($spacer * .25)
- ),
- 2: (
- x: ($spacer * .5),
- y: ($spacer * .5)
- ),
- 3: (
- x: $spacer,
- y: $spacer
- ),
- 4: (
- x: ($spacer * 1.5),
- y: ($spacer * 1.5)
- ),
- 5: (
- x: ($spacer * 3),
- y: ($spacer * 3)
- )
+ 0: 0,
+ 1: ($spacer * .25),
+ 2: ($spacer * .5),
+ 3: $spacer,
+ 4: ($spacer * 1.5),
+ 5: ($spacer * 3)
) !default;
// This variable affects the `.h-*` and `.w-*` classes.
diff --git a/scss/utilities/_spacing.scss b/scss/utilities/_spacing.scss
index 6056e2b7e..c89816b5e 100644
--- a/scss/utilities/_spacing.scss
+++ b/scss/utilities/_spacing.scss
@@ -5,22 +5,20 @@
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@each $prop, $abbrev in (margin: m, padding: p) {
- @each $size, $lengths in $spacers {
- $length-x: map-get($lengths, x);
- $length-y: map-get($lengths, y);
+ @each $size, $length in $spacers {
- .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length-y $length-x !important; }
- .#{$abbrev}t#{$infix}-#{$size} { #{$prop}-top: $length-y !important; }
- .#{$abbrev}r#{$infix}-#{$size} { #{$prop}-right: $length-x !important; }
- .#{$abbrev}b#{$infix}-#{$size} { #{$prop}-bottom: $length-y !important; }
- .#{$abbrev}l#{$infix}-#{$size} { #{$prop}-left: $length-x !important; }
+ .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
+ .#{$abbrev}t#{$infix}-#{$size} { #{$prop}-top: $length !important; }
+ .#{$abbrev}r#{$infix}-#{$size} { #{$prop}-right: $length !important; }
+ .#{$abbrev}b#{$infix}-#{$size} { #{$prop}-bottom: $length !important; }
+ .#{$abbrev}l#{$infix}-#{$size} { #{$prop}-left: $length !important; }
.#{$abbrev}x#{$infix}-#{$size} {
- #{$prop}-right: $length-x !important;
- #{$prop}-left: $length-x !important;
+ #{$prop}-right: $length !important;
+ #{$prop}-left: $length !important;
}
.#{$abbrev}y#{$infix}-#{$size} {
- #{$prop}-top: $length-y !important;
- #{$prop}-bottom: $length-y !important;
+ #{$prop}-top: $length !important;
+ #{$prop}-bottom: $length !important;
}
}
}