]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add make-col-auto mixin (#29367)
authorMark Otto <otto@github.com>
Thu, 17 Oct 2019 06:46:34 +0000 (23:46 -0700)
committerXhmikosR <xhmikosr@gmail.com>
Sat, 2 Nov 2019 08:02:07 +0000 (10:02 +0200)
scss/mixins/_grid-framework.scss
scss/mixins/_grid.scss

index 80fc7cc4b3ee4e9b9ddbc5099c65c9f39c4927b0..8e291f7ae0dc75e3bb9580f4c952ca0476843f7a 100644 (file)
@@ -41,9 +41,7 @@
       }
 
       .col#{$infix}-auto {
-        flex: 0 0 auto;
-        width: auto;
-        max-width: 100%; // Reset earlier grid tiers
+        @include make-col-auto();
       }
 
       @for $i from 1 through $columns {
index 339fd9c083d9bd7f830449c6f0314bedc4c44986..b1240b01f15ff7e80328b4a5a23885cece1f6a63 100644 (file)
   max-width: percentage($size / $columns);
 }
 
+@mixin make-col-auto() {
+  flex: 0 0 auto;
+  width: auto;
+  max-width: 100%; // Reset earlier grid tiers
+}
+
 @mixin make-col-offset($size, $columns: $grid-columns) {
   $num: $size / $columns;
   margin-left: if($num == 0, 0, percentage($num));