mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-28 20:52:21 +01:00
responsive auto margin classes
This commit is contained in:
parent
f99d179690
commit
4f85513608
@ -15,14 +15,6 @@
|
||||
|
||||
// Margin and Padding
|
||||
|
||||
.mx-auto {
|
||||
margin-right: auto !important;
|
||||
margin-left: auto !important;
|
||||
}
|
||||
|
||||
.mr-auto { margin-right: auto !important; }
|
||||
.ml-auto { margin-left: auto !important; }
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@each $prop, $abbrev in (margin: m, padding: p) {
|
||||
@each $size, $lengths in $spacers {
|
||||
@ -48,6 +40,19 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Some special margin utils
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
.mx#{$infix}-auto {
|
||||
margin-right: auto !important;
|
||||
margin-left: 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; }
|
||||
}
|
||||
}
|
||||
|
||||
// Positioning
|
||||
|
Loading…
x
Reference in New Issue
Block a user