Created
January 18, 2016 19:14
-
-
Save rtivital/d32a2b8e6716c223cf53 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
<input type="email" placeholder="[email protected]" class="input"> |
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
// ---- | |
// libsass (v3.3.2) | |
// ---- | |
@mixin placeholder { | |
&::-webkit-input-placeholder {@content} | |
&:-moz-placeholder {@content} | |
&::-moz-placeholder {@content} | |
&:-ms-input-placeholder {@content} | |
} | |
.input { | |
padding: .5rem; | |
@include placeholder { | |
color: #aaa; | |
opacity: 1; | |
transition: opacity 200ms; | |
} | |
&:focus { | |
@include placeholder { | |
opacity: 0; | |
} | |
} | |
} | |
@include placeholder { | |
color: blue; | |
} |
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
.input { | |
padding: .5rem; | |
} | |
.input::-webkit-input-placeholder { | |
color: #aaa; | |
opacity: 1; | |
transition: opacity 200ms; | |
} | |
.input:-moz-placeholder { | |
color: #aaa; | |
opacity: 1; | |
transition: opacity 200ms; | |
} | |
.input::-moz-placeholder { | |
color: #aaa; | |
opacity: 1; | |
transition: opacity 200ms; | |
} | |
.input:-ms-input-placeholder { | |
color: #aaa; | |
opacity: 1; | |
transition: opacity 200ms; | |
} | |
.input:focus::-webkit-input-placeholder { | |
opacity: 0; | |
} | |
.input:focus:-moz-placeholder { | |
opacity: 0; | |
} | |
.input:focus::-moz-placeholder { | |
opacity: 0; | |
} | |
.input:focus:-ms-input-placeholder { | |
opacity: 0; | |
} | |
::-webkit-input-placeholder { | |
color: blue; | |
} | |
:-moz-placeholder { | |
color: blue; | |
} | |
::-moz-placeholder { | |
color: blue; | |
} | |
:-ms-input-placeholder { | |
color: blue; | |
} |
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
<input type="email" placeholder="[email protected]" class="input"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment