From 3e26e22573f3e77611a37f50683caed853a67310 Mon Sep 17 00:00:00 2001 From: Ivan Kalinin Date: Mon, 8 Oct 2018 08:48:03 -0700 Subject: [PATCH] updated make-col and make-col-offset mixins to let browsers calculate columns width by themselves --- scss/mixins/_grid.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scss/mixins/_grid.scss b/scss/mixins/_grid.scss index 254f0734c9b0..a92f5952f1a1 100644 --- a/scss/mixins/_grid.scss +++ b/scss/mixins/_grid.scss @@ -38,14 +38,14 @@ } @mixin make-col($size, $columns: $grid-columns) { - flex: 0 0 percentage($size / $columns); + flex: 0 0 calc(100% / #{$columns} * #{$size}); // Add a `max-width` to ensure content within each column does not blow out // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari // do not appear to require this. - max-width: percentage($size / $columns); + max-width: calc(100% / #{$columns} * #{$size}); } @mixin make-col-offset($size, $columns: $grid-columns) { $num: $size / $columns; - margin-left: if($num == 0, 0, percentage($num)); + margin-left: if($num == 0, 0, calc(100% / #{$columns} * #{$size})); }