2015-11-06 07:17:34 +01:00
|
|
|
// Margin and Padding
|
2015-06-01 10:19:02 +02:00
|
|
|
|
2016-11-01 05:13:05 +01:00
|
|
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
2016-12-25 23:11:09 +01:00
|
|
|
@include media-breakpoint-up($breakpoint) {
|
|
|
|
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
2016-11-01 05:13:05 +01:00
|
|
|
|
2016-12-25 23:11:09 +01:00
|
|
|
@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);
|
2016-11-28 22:23:59 +01:00
|
|
|
|
|
|
|
.#{$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}x#{$infix}-#{$size} {
|
2016-12-25 23:11:09 +01:00
|
|
|
#{$prop}-right: $length-x !important;
|
|
|
|
#{$prop}-left: $length-x !important;
|
2016-11-28 22:23:59 +01:00
|
|
|
}
|
|
|
|
.#{$abbrev}y#{$infix}-#{$size} {
|
|
|
|
#{$prop}-top: $length-y !important;
|
|
|
|
#{$prop}-bottom: $length-y !important;
|
2016-11-01 05:13:05 +01:00
|
|
|
}
|
|
|
|
}
|
2015-11-06 07:17:34 +01:00
|
|
|
}
|
2016-12-25 22:20:04 +01:00
|
|
|
|
2016-12-25 23:11:09 +01:00
|
|
|
// Some special margin utils
|
|
|
|
.m#{$infix}-auto { margin: auto !important; }
|
|
|
|
.mt#{$infix}-auto { margin-top: auto !important; }
|
|
|
|
.mr#{$infix}-auto { margin-right: auto !important; }
|
|
|
|
.mb#{$infix}-auto { margin-bottom: auto !important; }
|
|
|
|
.ml#{$infix}-auto { margin-left: auto !important; }
|
2016-12-25 03:11:43 +01:00
|
|
|
.mx#{$infix}-auto {
|
|
|
|
margin-right: auto !important;
|
|
|
|
margin-left: auto !important;
|
|
|
|
}
|
2016-12-25 03:52:45 +01:00
|
|
|
.my#{$infix}-auto {
|
2016-12-25 23:11:09 +01:00
|
|
|
margin-top: auto !important;
|
|
|
|
margin-bottom: auto !important;
|
2016-12-25 03:52:45 +01:00
|
|
|
}
|
2016-12-25 03:11:43 +01:00
|
|
|
}
|
2015-11-06 07:17:34 +01:00
|
|
|
}
|