Commit 4f855136 authored by Mark Otto's avatar Mark Otto Committed by Mark Otto
Browse files

responsive auto margin classes

parent f99d1796
Showing with 13 additions and 8 deletions
+13 -8
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment