text-indent: 0;
}
.slide-up:focus,
.slide-up:active {
color: #377D6A;
text-indent: 0;
background: #fff;
&::-webkit-input-placeholder {
color: #aaa;
}
+ label {
transform: translateY(-100%);
&:before {
border-radius: 5px;
}
&:after {
transform: translateY(100%);
}
}
}
.card-slide {
display: inline-block;
width: 215px;
padding: 10px 0 10px 15px;
font-family: "Open Sans", sans;
font-weight: 400;
color: #377D6A;
background: #efefef;
border: 0;
border-radius: 3px;
outline: 0;
text-indent: 115px; // Arbitrary.
transition: all .3s ease-in-out;
&::-webkit-input-placeholder {
color: #efefef;
text-indent: 0;
font-weight: 300;
}
+ label {
display: block;
position: absolute;
top: 0;
left: 0;
padding: 10px 15px;
text-shadow: 0 1px 0 rgba(19,74,70,.4);
background: #7AB893;
transition: all .3s ease-in-out;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
transform-origin: right center;
transform: perspective(300px) scaleX(1) rotateY(0deg);
}
}
span:nth-child(2) .card-slide {
text-indent: 55px;
}
span:nth-child(3) .card-slide {
text-indent: 150px;
}
span:nth-child(2) .card-slide:focus,
span:nth-child(2) .card-slide:active,
span:nth-child(3) .card-slide:focus,
span:nth-child(3) .card-slide:active {
text-indent: 0;
}
.card-slide:focus,
.card-slide:active {
color: #377D6A;
text-indent: 0;
background: #fff;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
&::-webkit-input-placeholder {
color: #aaa;
}
+ label {
transform: perspective(600px) translateX(-100%) rotateY(80deg);
}
}
.swing {
display: inline-block;
width: 215px;
padding: 10px 0 10px 15px;
font-family: "Open Sans", sans;
font-weight: 400;
color: #377D6A;
background: #efefef;
border: 0;
border-radius: 3px;
outline: 0;
text-indent: 60px; // Arbitrary.
transition: all .3s ease-in-out;
&::-webkit-input-placeholder {
color: #efefef;
text-indent: 0;
font-weight: 300;
}
+ label {
display: inline-block;
position: absolute;
top: 0;
left: 0;
padding: 10px 15px;
text-shadow: 0 1px 0 rgba(19,74,70,.4);
background: #7AB893;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
transform-origin: 2px 2px;
transform: rotate(0);
// There should be a better way
animation: swing-back .4s 1 ease-in-out;
}
}
@keyframes swing {
0% {
transform: rotate(0);
}
20% {
transform: rotate(116deg);
}
40% {
transform: rotate(60deg);
}
60% {
transform: rotate(98deg);
}
80% {
transform: rotate(76deg);










