Created
February 26, 2013 15:45
-
-
Save bolmaster2/5039453 to your computer and use it in GitHub Desktop.
Use a mixin to style placeholder input text cross browser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// use one mixin for styling placeholder input text cross browser | |
@mixin placeholder ($color) { | |
/* WebKit browsers */ | |
::-webkit-input-placeholder { | |
color: $color; | |
} | |
/* Mozilla Firefox 4 to 18 */ | |
input:-moz-placeholder, | |
textarea:-moz-placeholder { | |
color: $color; | |
} | |
/* Mozilla Firefox 19+ */ | |
::-moz-placeholder { | |
color: $color; | |
} | |
/* Internet Explorer 10+ */ | |
:-ms-input-placeholder { | |
color: $color; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment