Created
February 11, 2014 15:59
-
-
Save VinSpee/8937715 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
<form> | |
<div class="field"> | |
<input type="text" pattern=".+" required="" placeholder="First Name"><label>First Name</label> | |
</div> <div class="field"> | |
<input type="text" pattern=".+" required="" placeholder="Last Name"><label>Last Name</label> | |
</div> | |
</form> |
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
// ---- | |
// Sass (v3.3.0.rc.3) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
.field | |
position: relative | |
font-family: Arial | |
text-transform: uppercase | |
font-weight: bold | |
display: inline-block | |
label | |
position: absolute | |
left: 0 | |
top: 0 | |
transition: all .2s linear | |
color: #999 | |
font-size: 10px | |
input | |
margin-top: 15px | |
border: 1px solid #999 | |
padding: 3px 2px | |
input:invalid + label | |
top: 3px | |
opacity: 0 | |
input:valid + label | |
opacity: 1 | |
top: 0 | |
input:focus | |
outline: none | |
input:focus + label | |
color: #33A |
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
.field { | |
position: relative; | |
font-family: Arial; | |
text-transform: uppercase; | |
font-weight: bold; | |
display: inline-block; | |
} | |
label { | |
position: absolute; | |
left: 0; | |
top: 0; | |
transition: all .2s linear; | |
color: #999; | |
font-size: 10px; | |
} | |
input { | |
margin-top: 15px; | |
border: 1px solid #999; | |
padding: 3px 2px; | |
} | |
input:invalid + label { | |
top: 3px; | |
opacity: 0; | |
} | |
input:valid + label { | |
opacity: 1; | |
top: 0; | |
} | |
input:focus { | |
outline: none; | |
} | |
input:focus + label { | |
color: #33A; | |
} |
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
<form> | |
<div class="field"> | |
<input type="text" pattern=".+" required="" placeholder="First Name"><label>First Name</label> | |
</div> <div class="field"> | |
<input type="text" pattern=".+" required="" placeholder="Last Name"><label>Last Name</label> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment