+
Second, but last
-
@@ -542,33 +542,21 @@ Use flexbox utilities for controlling the **visual order** of your content.
### Offsetting columns
-Move columns to the right using `.offset-md-*` classes. These classes increase the left margin of a column by `*` columns. For example, `.offset-md-4` moves `.col-md-4` over four columns.
+With the move to flexbox in v4, we no longer have v3's style of offset classes. Instead, use margin utilities like `.mr-auto` to force sibling columns away from one another.
{% example html %}
.col-md-4
-
.col-md-4 .offset-md-4
+
.col-md-4 .ml-auto
-
.col-md-3 .offset-md-3
-
.col-md-3 .offset-md-3
+
.col-md-3 .ml-md-auto
+
.col-md-3 .ml-md-auto
-
.col-md-6 .offset-md-3
-
-{% endexample %}
-
-
-### Push and pull
-
-Easily change the order of our built-in grid columns with `.push-md-*` and `.pull-md-*` modifier classes.
-
-
-{% example html %}
-
-
.col-md-9 .push-md-3
-
.col-md-3 .pull-md-9
+
.col-auto .mr-auto
+
.col-auto
{% endexample %}
diff --git a/scss/mixins/_grid-framework.scss b/scss/mixins/_grid-framework.scss
index 236aadf0c7..0ff72fe2bf 100644
--- a/scss/mixins/_grid-framework.scss
+++ b/scss/mixins/_grid-framework.scss
@@ -46,20 +46,9 @@
}
}
- @each $modifier in (pull, push) {
- @for $i from 0 through $columns {
- .#{$modifier}#{$infix}-#{$i} {
- @include make-col-modifier($modifier, $i, $columns)
- }
- }
- }
-
- // `$columns - 1` because offsetting by the width of an entire row isn't possible
- @for $i from 0 through ($columns - 1) {
- @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
- .offset#{$infix}-#{$i} {
- @include make-col-modifier(offset, $i, $columns)
- }
+ @for $i from 1 through $columns {
+ .order#{$infix}-#{$i} {
+ order: $i
}
}
}
diff --git a/scss/utilities/_flex.scss b/scss/utilities/_flex.scss
index cc696785dc..b28c0b97de 100644
--- a/scss/utilities/_flex.scss
+++ b/scss/utilities/_flex.scss
@@ -6,10 +6,6 @@
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
- .order#{$infix}-first { order: -1; }
- .order#{$infix}-last { order: 1; }
- .order#{$infix}-0 { order: 0; }
-
.flex#{$infix}-row { flex-direction: row !important; }
.flex#{$infix}-column { flex-direction: column !important; }
.flex#{$infix}-row-reverse { flex-direction: row-reverse !important; }