Last active
August 29, 2015 14:26
-
-
Save ummahusla/d7eb339db4d9ff17376e to your computer and use it in GitHub Desktop.
Change the input color of the text & placeholder on focus [SASS]
This file contains hidden or 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
.css-input { | |
color: $white; | |
&:focus { | |
color: $black; | |
} | |
&::-webkit-input-placeholder { | |
color: $white; | |
} | |
&:focus::-webkit-input-placeholder { | |
color: $black; | |
} | |
/* Firefox < 19 */ | |
&:-moz-placeholder { | |
color: $white; | |
} | |
&:focus:-moz-placeholder { | |
color: $black; | |
} | |
/* Firefox > 19 */ | |
&::-moz-placeholder { | |
color: $white; | |
} | |
&:focus::-moz-placeholder { | |
color: $black; | |
} | |
/* Internet Explorer 10 */ | |
&:-ms-input-placeholder { | |
color: $white; | |
} | |
&:focus:-ms-input-placeholder { | |
color: $black; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment