Created
October 28, 2013 14:52
-
-
Save colmjude/7198131 to your computer and use it in GitHub Desktop.
Couple of sass mixins I use regularly * vendor prefix
* placeholder text
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: | |
@include vendor-prefix(border-radius, 2px); | |
*/ | |
@mixin vendor-prefix($name, $argument) { | |
@each $prefix in -webkit-, -moz-, -ms-, -o-, '' { | |
#{$prefix}#{$name}: $argument; | |
} | |
} | |
/* Usage: | |
@include placeholder( shade(#eee, 20%) ); | |
*/ | |
@mixin placeholder($color) { | |
@each $prefix in "::-webkit-input-", ":-moz-", "::-moz-", ":-ms-input-" { | |
#{$prefix}placeholder { | |
color: $color; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment