Skip to content

Commit

Permalink
Set null as default prefix for sizes mixins
Browse files Browse the repository at this point in the history
Concerns stand-alone mixins, not the all-round ones (`--w`, `--h`).
  • Loading branch information
meduzen committed Jul 19, 2019
1 parent 754a526 commit e2df04a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/mixins/_sizes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

// Width

@mixin --w($widths, $from-prefix: '', $to-prefix: 'to-') {
@mixin --w($widths, $from-prefix: null, $to-prefix: 'to-') {
@each $name, $width in $widths {
@include --w-from(#{$name}, #{$width}, #{$from-prefix});
@include --w-to(#{$name}, #{$width}, #{$to-prefix});
Expand All @@ -34,15 +34,15 @@
}
}

@mixin --w-from($name, $width, $prefix: '') {
@mixin --w-from($name, $width, $prefix: null) {
@include --media(#{$prefix}#{$name}, 'width >=' #{$width});
}

@mixin --w-is($name, $width, $prefix: 'is-') {
@mixin --w-is($name, $width, $prefix: null) {
@include --media(#{$prefix}#{$name}, unquote('width:') #{$width});
}

@mixin --w-to($name, $width, $prefix: 'to-') {
@mixin --w-to($name, $width, $prefix: null) {
@include --media(#{$prefix}#{$name}, 'width <' #{$width});
}

Expand All @@ -65,15 +65,15 @@
}
}

@mixin --h-from($name, $height, $prefix: 'h-') {
@mixin --h-from($name, $height, $prefix: null) {
@include --media(#{$prefix}#{$name}, 'height >=' #{$height});
}

@mixin --h-is($name, $height, $prefix: 'h-is-') {
@mixin --h-is($name, $height, $prefix: null) {
@include --media(#{$prefix}#{$name}, unquote('height:') #{$height});
}

@mixin --h-to($name, $height, $prefix: 'h-to-') {
@mixin --h-to($name, $height, $prefix: null) {
@include --media(#{$prefix}#{$name}, 'height <' #{$height});
}

Expand Down

0 comments on commit e2df04a

Please sign in to comment.