98 lines
1.6 KiB
SCSS
98 lines
1.6 KiB
SCSS
|
@import "./variables";
|
||
|
/* .input {
|
||
|
//padding: 0.4em 0.25em;
|
||
|
width: 100%;
|
||
|
background: transparent;
|
||
|
color: #afb5bb;
|
||
|
//font-size: 1.55em;
|
||
|
&:focus + label span {
|
||
|
transform: translate3d(0, -90%, 0);
|
||
|
}
|
||
|
|
||
|
& + label {
|
||
|
position: absolute;
|
||
|
width: 100%;
|
||
|
text-align: left;
|
||
|
pointer-events: none;
|
||
|
left: 0;
|
||
|
& span{
|
||
|
transition: transform .3s;
|
||
|
}
|
||
|
}
|
||
|
} */
|
||
|
|
||
|
.input-container {
|
||
|
position: relative;
|
||
|
margin-top: 10px;
|
||
|
width: 100%;
|
||
|
}
|
||
|
|
||
|
|
||
|
.input {
|
||
|
background-color: transparent;
|
||
|
border: none;
|
||
|
padding: 10px 10px 10px 5px;
|
||
|
border-bottom: 1px solid $input-border;
|
||
|
width: 100%;
|
||
|
font-size: .9em;
|
||
|
font-weight: 500;
|
||
|
color: white;
|
||
|
& ~ label {
|
||
|
font-size: 1em;
|
||
|
font-weight: normal;
|
||
|
position: absolute;
|
||
|
pointer-events: none;
|
||
|
left: 5px;
|
||
|
top: 10px;
|
||
|
transition: 0.3s ease all;
|
||
|
font-weight: 400;
|
||
|
color: #8e8e8e;
|
||
|
opacity: .4;
|
||
|
}
|
||
|
&:focus {
|
||
|
outline: none;
|
||
|
}
|
||
|
|
||
|
&:focus ~ label,
|
||
|
&:valid ~ label {
|
||
|
top: -.8em;
|
||
|
font-size: 12px;
|
||
|
color: $contrast;
|
||
|
opacity: 1;
|
||
|
font-weight: 600;
|
||
|
}
|
||
|
&:focus ~ .bar:before {
|
||
|
width: 100%;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.bar {
|
||
|
position: relative;
|
||
|
display: block;
|
||
|
width: 100%;
|
||
|
&:before {
|
||
|
content: "";
|
||
|
height: 2px;
|
||
|
width: 0;
|
||
|
bottom: 0px;
|
||
|
position: absolute;
|
||
|
background: $contrast;
|
||
|
transition: 0.3s ease all;
|
||
|
left: 0%;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
.error{
|
||
|
color: $red;
|
||
|
& input{
|
||
|
color: $red;
|
||
|
border-bottom: 1px solid $red;
|
||
|
&:focus ~ label, &:valid ~label{
|
||
|
color: $red;
|
||
|
}
|
||
|
&:focus ~ .bar::before{
|
||
|
background-color: $red;
|
||
|
}
|
||
|
}
|
||
|
}
|