]> git.ipfire.org Git - ipfire.org.git/blame - src/scss/bootstrap-4.0.0-alpha.6/scss/utilities/_spacing.scss
Introduce autotools
[ipfire.org.git] / src / scss / bootstrap-4.0.0-alpha.6 / scss / utilities / _spacing.scss
CommitLineData
91e44d91
S
1// Margin and Padding
2
3@each $breakpoint in map-keys($grid-breakpoints) {
4 @include media-breakpoint-up($breakpoint) {
5 $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
6
7 @each $prop, $abbrev in (margin: m, padding: p) {
8 @each $size, $lengths in $spacers {
9 $length-x: map-get($lengths, x);
10 $length-y: map-get($lengths, y);
11
12 .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length-y $length-x !important; }
13 .#{$abbrev}t#{$infix}-#{$size} { #{$prop}-top: $length-y !important; }
14 .#{$abbrev}r#{$infix}-#{$size} { #{$prop}-right: $length-x !important; }
15 .#{$abbrev}b#{$infix}-#{$size} { #{$prop}-bottom: $length-y !important; }
16 .#{$abbrev}l#{$infix}-#{$size} { #{$prop}-left: $length-x !important; }
17 .#{$abbrev}x#{$infix}-#{$size} {
18 #{$prop}-right: $length-x !important;
19 #{$prop}-left: $length-x !important;
20 }
21 .#{$abbrev}y#{$infix}-#{$size} {
22 #{$prop}-top: $length-y !important;
23 #{$prop}-bottom: $length-y !important;
24 }
25 }
26 }
27
28 // Some special margin utils
29 .m#{$infix}-auto { margin: auto !important; }
30 .mt#{$infix}-auto { margin-top: auto !important; }
31 .mr#{$infix}-auto { margin-right: auto !important; }
32 .mb#{$infix}-auto { margin-bottom: auto !important; }
33 .ml#{$infix}-auto { margin-left: auto !important; }
34 .mx#{$infix}-auto {
35 margin-right: auto !important;
36 margin-left: auto !important;
37 }
38 .my#{$infix}-auto {
39 margin-top: auto !important;
40 margin-bottom: auto !important;
41 }
42 }
43}