Created
January 4, 2017 09:46
-
-
Save SashaKolbasov/8c15b1ead9658816390c40e73be1bfe4 to your computer and use it in GitHub Desktop.
Placeholder Focus
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
.plchfcs { | |
opacity: 1; | |
transition: opacity .15s ease-out; | |
} | |
input { | |
&::-webkit-input-placeholder { | |
.plchfcs; | |
} | |
&::-moz-placeholder { | |
.plchfcs; | |
} | |
&:-moz-placeholder { | |
.plchfcs; | |
} | |
&:-ms-input-placeholder { | |
.plchfcs; | |
} | |
&:focus { | |
&::-webkit-input-placeholder { | |
opacity: 0; | |
} | |
&::-moz-placeholder { | |
opacity: 0; | |
} | |
&:-moz-placeholder { | |
opacity: 0; | |
} | |
&:-ms-input-placeholder { | |
opacity: 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment