2018-02-23 22:55:07 +11:00

43 lines
1.1 KiB
SCSS

/*
* Prefix Mixins
* Mixins used to add browser prefix to values and/or properties
*
* Version:
* 1.0.0 - 2018/02/23
*/
@mixin t-prefix-property($property, $value, $prefixes) {
@each $prefix in $prefixes {
@if $prefix == webkit {
-webkit-#{$property}: $value;
} @else if $prefix == moz {
-moz-#{$property}: $value;
} @else if $prefix == ms {
-ms-#{$property}: $value;
} @else if $prefix == o {
-o-#{$property}: $value;
} @else if $prefix == spec {
#{$property}: $value;
} @else {
@warn 'Unrecognized prefix: #{$prefix}';
}
}
}
@mixin t-prefix-value($property, $value, $prefixes) {
@each $prefix in $prefixes {
@if $prefix == webkit {
#{$property}: -webkit-#{$value};
} @else if $prefix == moz {
#{$property}: -moz-#{$value};
} @else if $prefix == ms {
#{$property}: -ms-#{$value};
} @else if $prefix == o {
#{$property}: -o-#{$value};
} @else if $prefix == spec {
#{$property}: #{$value};
} @else {
@warn 'Unrecognized prefix: #{$prefix}';
}
}
}