Skip to content

Instantly share code, notes, and snippets.

@elijahmanor
Created November 6, 2013 21:11
Show Gist options
  • Save elijahmanor/7344159 to your computer and use it in GitHub Desktop.
Save elijahmanor/7344159 to your computer and use it in GitHub Desktop.
Placeholder SASS Mixin
/*
Usage:
$placeholder: #999;
input {
@include placeholder { color: $placeholder; }
}
*/
@mixin placeholder {
&::-webkit-input-placeholder { @content } /* webkit */
&:-moz-placeholder { @content } /* ff 4-18 */
&::-moz-placeholder { @content } /* ff 19+ */
&:-ms-input-placeholder { @content } /* ie 10+ */
&:-input-placeholder { @content } /* other... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment