Last active
March 7, 2021 02:28
-
-
Save niikkiin/2e34aa78f254065588d54d909b0eedc0 to your computer and use it in GitHub Desktop.
Autoprefixer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Usage: | |
.element { | |
@include prefix(transform, rotate(42deg), webkit ms); | |
} | |
Output | |
.element { | |
-webkit-transform: rotate(42deg); | |
-ms-transform: rotate(42deg); | |
transform: rotate(42deg); | |
} | |
}*/ | |
@mixin prefix($property, $value, $vendors: webkit moz ms o) { | |
@if $vendors { | |
@each $vendor in $vendors { | |
#{"-" + $vendor + "-" + $property}: #{$value}; | |
} | |
} | |
#{$property}: #{$value}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment