mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-06 04:08:22 +01:00
Clean up _spacing.scss a little bit
This commit is contained in:
parent
7fdedbd5e6
commit
210050d9c9
@ -16,14 +16,14 @@
|
||||
// Margin and Padding
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$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);
|
||||
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
|
||||
.#{$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; }
|
||||
@ -39,13 +39,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Some special margin utils
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
|
||||
.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; }
|
||||
.mx#{$infix}-auto {
|
||||
margin-right: auto !important;
|
||||
margin-left: auto !important;
|
||||
@ -54,10 +54,6 @@
|
||||
margin-top: auto !important;
|
||||
margin-bottom: 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; }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user