Skip to content

Instantly share code, notes, and snippets.

@tarolandia
Created April 22, 2013 12:33
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save tarolandia/5434575 to your computer and use it in GitHub Desktop.
Save tarolandia/5434575 to your computer and use it in GitHub Desktop.
Sass: mixin that let you change placeholder font color.
@mixin placeholder-color($color) {
&::-webkit-input-placeholder { /* WebKit browsers */
color: $color;
}
&:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: $color;
}
&::-moz-placeholder { /* Mozilla Firefox 19+ */
color: $color;
}
&:-ms-input-placeholder { /* Internet Explorer 10+ */
color: $color;
}
}
@ibanner
Copy link

ibanner commented Jun 9, 2017

Thanks, dude. very helpful!

@mikeoberdick
Copy link

Awesome! I was looking around and no other code worked!

@yossely
Copy link

yossely commented Nov 13, 2017

Works like a charm 🌟

@MatTeague
Copy link

This works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment