Skip to content

Instantly share code, notes, and snippets.

@jhilden
Created April 16, 2011 08:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jhilden/922985 to your computer and use it in GitHub Desktop.
Save jhilden/922985 to your computer and use it in GitHub Desktop.
A SASS mixin to set all the different (pseudo-) classes to style the color of placeholder text in e.g. an input field. What other styles besides color would be interesting?
@mixin input-placeholder($color)
&.placeholder
color: $color
&:-moz-placeholder
color: $color
&::-webkit-input-placeholder
color: $color
@imjared
Copy link

imjared commented Dec 22, 2011

font-family, font-size would be great

@jhilden
Copy link
Author

jhilden commented Dec 22, 2011

@imjared: check out this fork: https://gist.github.com/1071716 that should work for customizing any property of the input field

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