113 lines
1.8 KiB
SCSS
113 lines
1.8 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%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.input {
|
|
background-color: transparent;
|
|
border: none;
|
|
padding: 10px 10px 10px 5px;
|
|
border-bottom: 1px solid $input-border;
|
|
width: 100%;
|
|
font-size: 0.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: 0.4;
|
|
}
|
|
&:focus {
|
|
outline: none;
|
|
}
|
|
|
|
&:focus ~ label,
|
|
&:valid ~ label {
|
|
top: -0.8em;
|
|
font-size: 12px;
|
|
color: $contrast;
|
|
opacity: 1;
|
|
font-weight: 600;
|
|
}
|
|
&:disabled ~ label {
|
|
color: grey;
|
|
}
|
|
&: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;
|
|
}
|
|
}
|
|
}
|
|
|
|
.password-toggler {
|
|
position: absolute;
|
|
top: 50%;
|
|
transform: translate(-50%, -50%);
|
|
right: 0;
|
|
width: 20px;
|
|
height: 20px;
|
|
cursor: pointer;
|
|
}
|