]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add order-last grid class (#24915)
authorCasper Bornebusch <cahbb9@gmail.com>
Tue, 16 Jan 2018 17:10:40 +0000 (18:10 +0100)
committerMark Otto <markd.otto@gmail.com>
Tue, 16 Jan 2018 17:10:40 +0000 (09:10 -0800)
* Add order-*-last grid class

* copy updates

docs/4.0/layout/grid.md
scss/mixins/_grid-framework.scss

index efbc5520d3cb1c5ab45a562f80cd3b3c561bcd21..320872849f09a7cc128843f8d12bf63ee6849630 100644 (file)
@@ -534,14 +534,14 @@ Use `.order-` classes for controlling the **visual order** of your content. Thes
 {% endexample %}
 </div>
 
-There's also a responsive `.order-first` class that quickly changes the order of one element by applying `order: -1`. This class can also be intermixed with the numbered `.order-*` classes as needed.
+There are also responsive `.order-first` and `.order-last` classes that change the `order` of an element by applying `order: -1` and `order: 13` (`order: $columns + 1`), respectively. These classes can also be intermixed with the numbered `.order-*` classes as needed.
 
 <div class="bd-example-row">
 {% example html %}
 <div class="container">
   <div class="row">
-    <div class="col">
-      First, but unordered
+    <div class="col order-last">
+      First, but last
     </div>
     <div class="col">
       Second, but unordered
index 4f854f4951348dc785fb2bb5ca65ab6ee3e44f97..7b37f868f198be0b678dda85a84bc058c247efeb 100644 (file)
         }
       }
 
-      .order#{$infix}-first {
-        order: -1;
-      }
+      .order#{$infix}-first { order: -1; }
+
+      .order#{$infix}-last { order: $columns + 1; }
 
       @for $i from 0 through $columns {
-        .order#{$infix}-#{$i} {
-          order: $i;
-        }
+        .order#{$infix}-#{$i} { order: $i; }
       }
 
       // `$columns - 1` because offsetting by the width of an entire row isn't possible