From 9be7aac83194cbebf8afc9e8ac323b5417b4ff96 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 16 Oct 2019 23:46:34 -0700 Subject: [PATCH] Add make-col-auto mixin (#29367) --- scss/mixins/_grid-framework.scss | 4 +--- scss/mixins/_grid.scss | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scss/mixins/_grid-framework.scss b/scss/mixins/_grid-framework.scss index 80fc7cc4b3..8e291f7ae0 100644 --- a/scss/mixins/_grid-framework.scss +++ b/scss/mixins/_grid-framework.scss @@ -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 { diff --git a/scss/mixins/_grid.scss b/scss/mixins/_grid.scss index 339fd9c083..b1240b01f1 100644 --- a/scss/mixins/_grid.scss +++ b/scss/mixins/_grid.scss @@ -45,6 +45,12 @@ 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));