Skip to content

Instantly share code, notes, and snippets.

@SashaKolbasov
Created January 4, 2017 09:46
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 SashaKolbasov/8c15b1ead9658816390c40e73be1bfe4 to your computer and use it in GitHub Desktop.
Save SashaKolbasov/8c15b1ead9658816390c40e73be1bfe4 to your computer and use it in GitHub Desktop.
Placeholder Focus
.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