created label and input elements

This commit is contained in:
Yusuf Ipek
2021-05-03 14:33:25 +03:00
parent 29cf4280df
commit 29a78aeb3a
3 changed files with 53 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
.form {
&__group:not(:last-child) {
margin-bottom: 2rem;
}
&__input {
font-size: 1.5rem;
font-family: inherit;
padding: 1.5rem 2rem;
color: inherit;
border-radius: $border-radius-small;
background-color: rgba($color-white, 0.5);
border: none;
border-bottom: 3px solid transparent;
width: 90%;
display: block;
&:focus {
outline: none;
box-shadow: $shadow-light;
border-bottom: $bottom-border-green;
}
&:focus:invalid {
border-bottom: $bottom-border-orange;
}
&::-webkit-input-placeholder {
color: $color-grey-dark-2;
}
}
&__label {
font-size: 1.2rem;
font-weight: 700;
margin-left: 2rem;
margin-top: 0.7rem;
display: block;
transition: all 0.3s;
}
&__input:placeholder-shown + &__label {
opacity: 0;
visibility: hidden;
transform: translateY(-4rem);
}
}