0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-19 16:54:24 +01:00

Add make-col-auto mixin (#29367)

This commit is contained in:
Mark Otto 2019-10-16 23:46:34 -07:00 committed by XhmikosR
parent f830450ca8
commit 9be7aac831
2 changed files with 7 additions and 3 deletions

View 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 {

View File

@ -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));