Skip to content

Instantly share code, notes, and snippets.

@juev
Forked from chriseppstein/input-placeholder.sass
Created April 17, 2011 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juev/923834 to your computer and use it in GitHub Desktop.
Save juev/923834 to your computer and use it in GitHub Desktop.
// Mixins ---------------------------------------------------------------
=placeholder
&::-webkit-input-placeholder
@children
&:-moz-placeholder
@children
&.placeholder
@children
=my-placeholder
+placeholder
color: #777
// add your defaults here.
// if you need more than type you can create several mixins,
=another-kind-of-placeholder
+placeholder
color: red
// Template --------------------------------------------------------------
// you can create as many templates as you need for your site
.placeholders
+my-placeholder
// Placeholders --------------------------------------------------------------
// call the template with @extend when you can
// or, when fighting the cascade you can call the mixin
input, textarea
@extend .placeholders
.something
+another-kind-of-placeholder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment