Created
March 9, 2014 21:06
-
-
Save ghosh/9454564 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// Sass (v3.3.0.rc.5) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
// Prefixing mixin | |
// ---------- | |
// @param [map] $map: property/value pairs to be prefixed | |
// @param [list] $vendors: vendor prefixes to use | |
// ---------- | |
@mixin prefix($map, $vendors: "webkit") { | |
// Loop through properties | |
@each $prop, $value in $map { | |
// If $vendors is not false | |
@if $vendors { | |
// Loop through vendors to dump prefixed property | |
@each $vendor in $vendors { | |
#{"-" + $vendor + "-" + $prop}: #{$value}; | |
} | |
} | |
// Dump regular property anyway | |
#{$prop}: #{$value}; | |
} | |
} | |
.default-prefix { | |
@include prefix(( | |
transform: rotate(42deg) | |
)); | |
} | |
.multiple-properties { | |
@include prefix(( | |
transform: rotate(42deg), | |
perspective: 1337 | |
)); | |
} | |
.moar-prefixes { | |
@include prefix(( | |
transform: rotate(42deg) | |
), "webkit" "moz"); | |
} | |
.no-prefix { | |
@include prefix(( | |
transform: rotate(42deg) | |
), false); | |
} |
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
.default-prefix { | |
-webkit-transform: rotate(42deg); | |
transform: rotate(42deg); | |
} | |
.multiple-properties { | |
-webkit-transform: rotate(42deg); | |
transform: rotate(42deg); | |
-webkit-perspective: 1337; | |
perspective: 1337; | |
} | |
.moar-prefixes { | |
-webkit-transform: rotate(42deg); | |
-moz-transform: rotate(42deg); | |
transform: rotate(42deg); | |
} | |
.no-prefix { | |
transform: rotate(42deg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment