diff options
author | Mark Otto <otto@github.com> | 2019-10-17 09:46:34 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2019-11-02 11:02:07 +0300 |
commit | 9be7aac83194cbebf8afc9e8ac323b5417b4ff96 (patch) | |
tree | c90c40e355398626a79fe3fd53fed77e50b1818f | |
parent | f830450ca876d01ad45b8083d7251ca487ef5133 (diff) |
Add make-col-auto mixin (#29367)
-rw-r--r-- | scss/mixins/_grid-framework.scss | 4 | ||||
-rw-r--r-- | 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)); |