Skip to content

Commit dc47704

Browse files
authored
Merge pull request #13 from EASYMOUNTAIN/master
Use dart-sass math.div to follow recommendation
2 parents 501051f + 12f2533 commit dc47704

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

dart-sass/_flexbox-grid-mixins.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ $flexbox-grid-mixins-stack: margin-bottom !default;
5050

5151
@if $flexbox-grid-mixins-grid-type == skeleton {
5252
@if $gutter {
53-
margin-left: $gutter / 2 * -1;
54-
margin-right: $gutter / 2 * -1;
53+
margin-left: math.div($gutter, 2) * -1;
54+
margin-right: math.div($gutter, 2) * -1;
5555
}
5656
}
5757

@@ -66,7 +66,7 @@ $flexbox-grid-mixins-stack: margin-bottom !default;
6666

6767
@if meta.type-of($col) == number and math.is-unitless($col) == true {
6868
$flex-shrink: 0;
69-
$flex-basis: math.percentage($col / $grid-columns);
69+
$flex-basis: math.percentage(math.div($col, $grid-columns));
7070

7171
@if $flexbox-grid-mixins-grid-type == skeleton {
7272
@if $gutter and math.unit($gutter) == '%' {
@@ -77,9 +77,9 @@ $flexbox-grid-mixins-stack: margin-bottom !default;
7777

7878
} @else if $flexbox-grid-mixins-grid-type == margin-offset {
7979
@if $gutter and math.unit($gutter) == '%' {
80-
$flex-basis: (100% - ($gutter * ($grid-columns / $col - 1))) / ($grid-columns / $col);
80+
$flex-basis: math.div(100% - ($gutter * (math.div($grid-columns, $col) - 1)), math.div($grid-columns, $col));
8181
} @else if $gutter and math.is-unitless($gutter) == false {
82-
$flex-basis: calc( #{$flex-basis} - #{$gutter * ($grid-columns / $col - 1) / ($grid-columns / $col)});
82+
$flex-basis: calc( #{$flex-basis} - #{$gutter * math.div(math.div($grid-columns, $col) - 1, math.div($grid-columns, $col))});
8383
}
8484
}
8585

@@ -173,8 +173,8 @@ $flexbox-grid-mixins-stack: margin-bottom !default;
173173

174174
@if $gutter and math.is-unitless($gutter) == false {
175175
@if $flexbox-grid-mixins-grid-type == skeleton {
176-
margin-left: $gutter / 2;
177-
margin-right: $gutter / 2;
176+
margin-left: math.div($gutter, 2);
177+
margin-right: math.div($gutter, 2);
178178
} @else if $flexbox-grid-mixins-grid-type == margin-offset {
179179
@if meta.type-of($last-child) == bool and $last-child == true {
180180
margin-right: 0;
@@ -188,8 +188,8 @@ $flexbox-grid-mixins-stack: margin-bottom !default;
188188
} @else if $flexbox-grid-mixins-stack == margin-bottom {
189189
margin-bottom: $gutter;
190190
} @else if $flexbox-grid-mixins-stack == margin-both {
191-
margin-top: $gutter / 2;
192-
margin-bottom: $gutter / 2;
191+
margin-top: math.div($gutter, 2);
192+
margin-bottom: math.div($gutter, 2);
193193
}
194194
}
195195

0 commit comments

Comments
 (0)