Skip to content

Instantly share code, notes, and snippets.

@colmjude
Created October 28, 2013 14:52
Show Gist options
  • Save colmjude/7198131 to your computer and use it in GitHub Desktop.
Save colmjude/7198131 to your computer and use it in GitHub Desktop.
Couple of sass mixins I use regularly * vendor prefix * placeholder text
/* 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