mirror of
https://github.com/yusufipk/natours-react.git
synced 2026-09-11 11:06:10 +00:00
104 lines
1.9 KiB
SCSS
104 lines
1.9 KiB
SCSS
.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;
|
|
transition: all 0.3s;
|
|
|
|
@include respond(tab-port) {
|
|
width: 100%;
|
|
}
|
|
|
|
&: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);
|
|
}
|
|
|
|
&__radio-group {
|
|
width: 50%;
|
|
display: inline-block;
|
|
|
|
@include respond(tab-port) {
|
|
width: 100%;
|
|
margin-bottom: 2rem;
|
|
}
|
|
}
|
|
|
|
&__radio-input {
|
|
display: none;
|
|
}
|
|
|
|
&__radio-label {
|
|
font-size: $default-font-size;
|
|
cursor: pointer;
|
|
position: relative;
|
|
padding-left: 3.4rem;
|
|
}
|
|
|
|
&__radio-button {
|
|
height: 3rem;
|
|
width: 3rem;
|
|
border: $bottom-border-green-thick;
|
|
border-radius: 50%;
|
|
display: inline-block;
|
|
position: absolute;
|
|
left: 0;
|
|
top: -0.5rem;
|
|
|
|
&::after {
|
|
content: "";
|
|
display: block;
|
|
height: 1.4rem;
|
|
width: 1.4rem;
|
|
border-radius: 50%;
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
background-color: $color-primary;
|
|
opacity: 0;
|
|
transition: opacity 0.2s;
|
|
}
|
|
}
|
|
|
|
&__radio-input:checked ~ &__radio-label &__radio-button::after {
|
|
opacity: 1;
|
|
}
|
|
}
|