diff --git a/public/styles/tools/prefix.scss b/public/styles/tools/prefix.scss new file mode 100644 index 0000000..0c2ff40 --- /dev/null +++ b/public/styles/tools/prefix.scss @@ -0,0 +1,42 @@ +/* + * 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}'; + } + } +}