Skip to content

Instantly share code, notes, and snippets.

@zesda
Last active December 17, 2015 13:39
Show Gist options
  • Save zesda/5618612 to your computer and use it in GitHub Desktop.
Save zesda/5618612 to your computer and use it in GitHub Desktop.
Very simple Input Placeholder Mixin for SASS. Allow styling of an <input> placeholder. Support for: Webkit browsers, Mozilla Firefox 4 to 18, Mozilla Firefox 19+, IE 10+.
/**
* Usage example:
*
* input {
* @include placeholder {
* // styles
* }
* }
*/
@mixin input-placeholder {
&::-webkit-input-placeholder { @content }
&:-moz-placeholder { @content }
&::-moz-placeholder { @content }
&:-ms-input-placeholder { @content }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment