2020-10-18 02:19:56 +03:00
|
|
|
.checkbox-field {
|
|
|
|
margin: 1.25rem 0;
|
|
|
|
display: block;
|
|
|
|
text-align: left;
|
|
|
|
padding: 0 1.125rem;
|
|
|
|
/* font-weight: 500; */
|
|
|
|
position: relative;
|
2021-01-03 14:59:12 +04:00
|
|
|
cursor: pointer;
|
2020-10-18 02:19:56 +03:00
|
|
|
|
|
|
|
@include respond-to(handhelds) {
|
|
|
|
margin-bottom: 27px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.checkbox-field-round {
|
2020-12-08 21:48:44 +02:00
|
|
|
.checkbox-caption {
|
|
|
|
min-width: 1.5rem;
|
|
|
|
min-height: 1.5rem;
|
2020-10-18 02:19:56 +03:00
|
|
|
|
2020-12-08 21:48:44 +02:00
|
|
|
&:before {
|
|
|
|
color: #fff;
|
|
|
|
font-size: 16px;
|
|
|
|
line-height: 24px;
|
|
|
|
margin-left: 4px;
|
|
|
|
transition: opacity .2s ease-in-out;
|
|
|
|
opacity: 0;
|
|
|
|
position: absolute;
|
|
|
|
font-weight: bold;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
border-radius: 50%;
|
|
|
|
height: 1.5rem;
|
|
|
|
width: 1.5rem;
|
|
|
|
box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, .4);
|
|
|
|
border: 2px solid #fff;
|
|
|
|
//left: 0;
|
|
|
|
background-color: transparent;
|
|
|
|
transition: background-color .2s ease-in-out;
|
2020-10-18 02:19:56 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-08 21:48:44 +02:00
|
|
|
[type="checkbox"]:checked + .checkbox-caption {
|
|
|
|
&:before {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
background-color: $button-primary-background;
|
|
|
|
}
|
2020-10-18 02:19:56 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.radio-field {
|
|
|
|
position: relative;
|
|
|
|
text-align: left;
|
|
|
|
margin: 1.25rem 0;
|
|
|
|
line-height: 1.5rem;
|
|
|
|
cursor: pointer;
|
2021-01-03 14:59:12 +04:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2020-10-18 02:19:56 +03:00
|
|
|
|
|
|
|
&.hidden-widget {
|
|
|
|
cursor: default;
|
|
|
|
|
|
|
|
.radio-field-main {
|
|
|
|
&::before, &::after {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> input {
|
|
|
|
&:checked {
|
|
|
|
& ~ .radio-field-main {
|
|
|
|
&::before {
|
|
|
|
border-color: $button-primary-background;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-03 14:59:12 +04:00
|
|
|
// ! can't use &-main here, check popup create poll
|
2020-10-18 02:19:56 +03:00
|
|
|
.radio-field-main {
|
2021-01-03 14:59:12 +04:00
|
|
|
padding-left: 3.5rem;
|
|
|
|
position: relative;
|
|
|
|
|
2020-10-18 02:19:56 +03:00
|
|
|
&::before, &::after {
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
2021-01-03 14:59:12 +04:00
|
|
|
left: 0;
|
2020-10-18 02:19:56 +03:00
|
|
|
top: 50%;
|
|
|
|
width: 1.25rem;
|
|
|
|
height: 1.25rem;
|
|
|
|
transform: translateY(-50%);
|
|
|
|
}
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
border: 2px solid #8d969c;
|
|
|
|
border-radius: 50%;
|
|
|
|
background-color: white;
|
|
|
|
opacity: 1;
|
|
|
|
transition: border-color .1s ease, opacity .1s ease;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
2021-01-03 14:59:12 +04:00
|
|
|
left: .3125rem;
|
2020-10-18 02:19:56 +03:00
|
|
|
width: .625rem;
|
|
|
|
height: .625rem;
|
|
|
|
border-radius: 50%;
|
|
|
|
background: $button-primary-background;
|
|
|
|
opacity: 0;
|
|
|
|
transition: opacity .1s ease;
|
|
|
|
}
|
|
|
|
|
2021-01-03 14:59:12 +04:00
|
|
|
/* &-subtitle {
|
|
|
|
color: #707579 !important;
|
|
|
|
font-size: 14px !important;
|
2020-10-18 02:19:56 +03:00
|
|
|
} */
|
|
|
|
}
|
2021-01-03 14:59:12 +04:00
|
|
|
|
|
|
|
/* &-with-subtitle {
|
|
|
|
.radio-field-main {
|
|
|
|
margin-bottom: 1.5rem;
|
|
|
|
|
|
|
|
&-subtitle {
|
|
|
|
margin-bottom: -1.5rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} */
|
2020-10-18 02:19:56 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
[type="checkbox"], [type="radio"] {
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 0;
|
|
|
|
opacity: 0;
|
|
|
|
z-index: var(--z-below);
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
|
2020-12-08 21:48:44 +02:00
|
|
|
.checkbox-field [type="checkbox"] {
|
2020-10-18 02:19:56 +03:00
|
|
|
& + span {
|
|
|
|
position: relative;
|
|
|
|
padding-left: 3.5rem;
|
|
|
|
cursor: pointer;
|
|
|
|
display: inline-block;
|
|
|
|
height: 25px;
|
|
|
|
line-height: 25px;
|
|
|
|
user-select: none;
|
|
|
|
transition: .2s opacity;
|
|
|
|
|
|
|
|
&:before, &:after {
|
|
|
|
content: '';
|
|
|
|
left: 0;
|
|
|
|
position: absolute;
|
|
|
|
transition: border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:before {
|
|
|
|
border-radius: 2px;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
height: 18px;
|
|
|
|
width: 18px;
|
|
|
|
z-index: 0;
|
|
|
|
border: 2px solid $button-primary-background;
|
|
|
|
border-radius: 3px;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:not(:checked) + span:before {
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
border: 2px solid transparent;
|
|
|
|
left: 6px;
|
|
|
|
top: 10px;
|
|
|
|
transform: rotateZ(45deg);
|
|
|
|
transform-origin: 100% 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:checked + span:before {
|
|
|
|
top: 4px;
|
|
|
|
left: -1px;
|
|
|
|
width: 8px;
|
|
|
|
height: 14px;
|
|
|
|
border-top: 2px solid transparent;
|
|
|
|
border-left: 2px solid transparent;
|
|
|
|
border-right: 2px solid #fff;
|
|
|
|
border-bottom: 2px solid #fff;
|
|
|
|
transform: rotateZ(45deg);
|
|
|
|
transform-origin: 100% 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:not(:checked) + span:after {
|
|
|
|
background-color: transparent;
|
|
|
|
border-color: #8d969c;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:checked + span:after {
|
|
|
|
background-color: $button-primary-background;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled + span {
|
|
|
|
cursor: default;
|
|
|
|
opacity: .25;
|
|
|
|
}
|
|
|
|
}
|