Last active
August 29, 2015 14:04
-
-
Save xifengzhu/a14bba07a2cdbf055e7b to your computer and use it in GitHub Desktop.
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
//prefixer | |
@mixin prefixer ($property, $value, $prefixes) { | |
@each $prefix in $prefixes { | |
@if $prefix == webkit and $prefix-for-webkit == true { | |
-webkit-#{$property}: $value; | |
} | |
@else if $prefix == moz and $prefix-for-mozilla == true { | |
-moz-#{$property}: $value; | |
} | |
@else if $prefix == ms and $prefix-for-microsoft == true { | |
-ms-#{$property}: $value; | |
} | |
@else if $prefix == o and $prefix-for-opera == true { | |
-o-#{$property}: $value; | |
} | |
@else if $prefix == spec and $prefix-for-spec == true { | |
#{$property}: $value; | |
} | |
@else { | |
@warn "Unrecognized prefix: #{$prefix}"; | |
} | |
} | |
} | |
@mixin skewX($degrees) { | |
@include prefixer(transform, skewX($degrees), webkit moz o ms spec); | |
-webkit-backface-visibility: hidden; | |
} | |
@mixin border-radius($values) { | |
-webkit-border-radius: $values; | |
-moz-border-radius: $values; | |
border-radius: $values; | |
} | |
div { | |
@ include border-radius(10px); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment