Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flex size support #15

Merged
merged 9 commits into from
Feb 18, 2023
Prev Previous commit
Next Next commit
fix(flex): use modular operator to check if params of flex-size mixin…
… is correct
  • Loading branch information
lievenjanssen committed Feb 18, 2023
commit 6ea3889143a2cf56272c1daa6d95a0e9f6566f25
2 changes: 1 addition & 1 deletion src/lib/flex-size-attributes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/// @param {bool} $includeSelectorsForMediaSizes
/// Will generate additional selectors for flex layout media sizes
@mixin flex-size-attributes($from: 5, $to: 100, $increment: 5, $includeSelectorsForMediaSizes: true) {
@if math.div($from, $increment) != math.round(math.div($from, $increment)) or math.div($to, $increment) != math.round(math.div($to, $increment)) {
@if $from % $increment != 0 or $to % $increment != 0 {
@error "$from (#{$from}) and $to (#{$to}) must be dividable by $increment (#{$increment}).";
}
@for $i from math.div($from, $increment) through math.div($to, $increment) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/flex-size-classes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/// @param {bool} $includeSelectorsForMediaSizes
/// Will generate additional selectors for flex layout media sizes
@mixin flex-size-classes($from: 5, $to: 100, $increment: 5, $includeSelectorsForMediaSizes: true) {
@if math.div($from, $increment) != math.round(math.div($from, $increment)) or math.div($to, $increment) != math.round(math.div($to, $increment)) {
@if $from % $increment != 0 or $to % $increment != 0 {
@error "$from (#{$from}) and $to (#{$to}) must be dividable by $increment (#{$increment}).";
}
@for $i from math.div($from, $increment) through math.div($to, $increment) {
Expand Down