Created
March 26, 2013 22:20
-
-
Save charliepark/5249843 to your computer and use it in GitHub Desktop.
A vendor prefixing mixin for Sass. Found it online. Sorry to whoever wrote it initially!
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
/** | |
* This mixin is awesome. Handles vendor prefixing in a single line. | |
*/ | |
@mixin vendor-prefix($name, $argument) { | |
-webkit-#{$name}: $argument; | |
-moz-#{$name}: $argument; | |
-ms-#{$name}: $argument; | |
-o-#{$name}: $argument; | |
#{$name}: $argument; | |
} | |
/** | |
* To use: | |
*/ | |
.something { | |
@include vendor-prefix(transition, 200ms ease); | |
} | |
/** | |
* Which renders as: | |
*/ | |
.something { | |
-webkit-transition: 200ms ease; | |
-moz-transition: 200ms ease; | |
-ms-transition: 200ms ease; | |
-o-transition: 200ms ease; | |
transition: 200ms ease; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment