Created
August 31, 2012 15:33
-
-
Save Tenderfeel/3554697 to your computer and use it in GitHub Desktop.
Sass 3.2 compatible vendor prefix mixin
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
$official:true; //Official | |
$support-for-webkit:true; //Chrome, Safari | |
$support-for-mozilla:true; //Firefox | |
$support-for-ie:true; //IE | |
$support-for-o:true; //Opera | |
@mixin prefix($property, $value...) { | |
@if $property == 'keyframes' { | |
@if $support-for-webkit { @-webkit-keyframes $value { @content; } } | |
@if $support-for-mozilla { @-mozilla-keyframes $value { @content; } } | |
@if $official {@keyframes $value { @content; } } | |
} @else { | |
@if $support-for-webkit { | |
-webkit-#{$property}: $value; | |
} | |
@if $support-for-mozilla { | |
-moz-#{$property}: $value; | |
} | |
@if $support-for-ie { | |
-ms-#{$property}: $value; | |
} | |
@if $support-for-o { | |
-o-#{$property}: $value; | |
} | |
@if $official { | |
#{$property}: $value; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment