2020-10-17 23:19:56 +00:00
|
|
|
.checkbox-field {
|
2021-01-20 01:38:59 +00:00
|
|
|
--size: 18px;
|
|
|
|
margin: 1.5rem 1.1875rem;
|
2020-10-17 23:19:56 +00:00
|
|
|
display: block;
|
|
|
|
text-align: left;
|
|
|
|
position: relative;
|
2021-01-03 10:59:12 +00:00
|
|
|
cursor: pointer;
|
2021-01-20 01:38:59 +00:00
|
|
|
min-width: var(--size);
|
|
|
|
min-height: var(--size);
|
2020-10-17 23:19:56 +00:00
|
|
|
|
|
|
|
@include respond-to(handhelds) {
|
|
|
|
margin-bottom: 27px;
|
|
|
|
}
|
|
|
|
|
2021-01-20 01:38:59 +00:00
|
|
|
.checkbox-box {
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%);
|
|
|
|
width: var(--size);
|
|
|
|
height: var(--size);
|
|
|
|
border-radius: 3px;
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
html.is-safari & {
|
|
|
|
-webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%); // fix safari overflow
|
|
|
|
}
|
|
|
|
|
|
|
|
&-check, &-background, &-border {
|
2020-12-08 19:48:44 +00:00
|
|
|
position: absolute;
|
2021-01-20 01:38:59 +00:00
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
}
|
2021-01-03 15:59:13 +00:00
|
|
|
|
2021-01-20 01:38:59 +00:00
|
|
|
&-border {
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
border-radius: inherit;
|
|
|
|
border: 2px solid #8d969c;
|
|
|
|
//border-color: #000;
|
2020-12-08 19:48:44 +00:00
|
|
|
}
|
|
|
|
|
2021-01-20 01:38:59 +00:00
|
|
|
&-background {
|
|
|
|
top: -15%;
|
|
|
|
right: -15%;
|
|
|
|
bottom: -15%;
|
|
|
|
left: -15%;
|
|
|
|
background-color: $button-primary-background;
|
|
|
|
transform: scale(1);
|
|
|
|
transition: transform .2s 0s ease-in-out;
|
2020-12-08 19:48:44 +00:00
|
|
|
border-radius: 50%;
|
2021-01-20 01:38:59 +00:00
|
|
|
}
|
2021-01-03 15:59:13 +00:00
|
|
|
|
2021-01-20 01:38:59 +00:00
|
|
|
&-check {
|
|
|
|
--offset: 1px;
|
|
|
|
width: calc(var(--size) - var(--offset));
|
|
|
|
height: calc(var(--size) - var(--offset));
|
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
|
|
|
|
use {
|
|
|
|
stroke: #fff;
|
|
|
|
stroke-width: 2.75;
|
|
|
|
stroke-linecap: round;
|
|
|
|
stroke-dasharray: 24.19, 24.19;
|
|
|
|
stroke-dashoffset: 0;
|
2021-01-20 02:02:43 +00:00
|
|
|
transition: stroke-dasharray .1s .15s ease-in-out, visibility 0s .15s;
|
2021-01-03 15:59:13 +00:00
|
|
|
}
|
2020-10-17 23:19:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-20 01:38:59 +00:00
|
|
|
.checkbox-caption {
|
|
|
|
position: relative;
|
|
|
|
padding-left: 3.3125rem;
|
|
|
|
cursor: pointer;
|
|
|
|
display: inline-block;
|
|
|
|
height: 24px;
|
|
|
|
line-height: 26px;
|
|
|
|
user-select: none;
|
|
|
|
transition: .2s opacity;
|
|
|
|
|
|
|
|
body.animation-level-0 & {
|
|
|
|
transition: none;
|
2020-12-08 19:48:44 +00:00
|
|
|
}
|
2021-01-20 01:38:59 +00:00
|
|
|
}
|
|
|
|
}
|
2020-12-08 19:48:44 +00:00
|
|
|
|
2021-01-20 01:38:59 +00:00
|
|
|
.checkbox-field-round {
|
|
|
|
--size: 1.5rem;
|
|
|
|
|
|
|
|
.checkbox-box {
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
|
|
&-border {
|
|
|
|
border: 2px solid #fff;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-check {
|
|
|
|
--offset: 10px;
|
2020-12-08 19:48:44 +00:00
|
|
|
}
|
2020-10-17 23:19:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.radio-field {
|
|
|
|
position: relative;
|
|
|
|
text-align: left;
|
|
|
|
margin: 1.25rem 0;
|
|
|
|
line-height: 1.5rem;
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
&.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 10:59:12 +00:00
|
|
|
// ! can't use &-main here, check popup create poll
|
2020-10-17 23:19:56 +00:00
|
|
|
.radio-field-main {
|
2021-01-03 10:59:12 +00:00
|
|
|
padding-left: 3.5rem;
|
|
|
|
position: relative;
|
|
|
|
|
2020-10-17 23:19:56 +00:00
|
|
|
&::before, &::after {
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
2021-01-03 10:59:12 +00:00
|
|
|
left: 0;
|
2020-10-17 23:19:56 +00:00
|
|
|
top: 50%;
|
|
|
|
width: 1.25rem;
|
|
|
|
height: 1.25rem;
|
|
|
|
transform: translateY(-50%);
|
2021-01-03 15:59:13 +00:00
|
|
|
|
|
|
|
body.animation-level-0 & {
|
|
|
|
transition: none;
|
|
|
|
}
|
2020-10-17 23:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&::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 10:59:12 +00:00
|
|
|
left: .3125rem;
|
2020-10-17 23:19:56 +00:00
|
|
|
width: .625rem;
|
|
|
|
height: .625rem;
|
|
|
|
border-radius: 50%;
|
|
|
|
background: $button-primary-background;
|
|
|
|
opacity: 0;
|
|
|
|
transition: opacity .1s ease;
|
|
|
|
}
|
|
|
|
|
2021-01-03 10:59:12 +00:00
|
|
|
/* &-subtitle {
|
|
|
|
color: #707579 !important;
|
|
|
|
font-size: 14px !important;
|
2020-10-17 23:19:56 +00:00
|
|
|
} */
|
|
|
|
}
|
2021-01-03 10:59:12 +00:00
|
|
|
|
|
|
|
/* &-with-subtitle {
|
|
|
|
.radio-field-main {
|
|
|
|
margin-bottom: 1.5rem;
|
|
|
|
|
|
|
|
&-subtitle {
|
|
|
|
margin-bottom: -1.5rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} */
|
2020-10-17 23:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[type="checkbox"], [type="radio"] {
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 0;
|
|
|
|
opacity: 0;
|
|
|
|
z-index: var(--z-below);
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
|
2020-12-08 19:48:44 +00:00
|
|
|
.checkbox-field [type="checkbox"] {
|
2021-01-20 01:38:59 +00:00
|
|
|
&:not(:checked) + .checkbox-box {
|
|
|
|
.checkbox-box-check {
|
|
|
|
use {
|
|
|
|
stroke-dasharray: 0, 24.19;
|
|
|
|
visibility: hidden;
|
|
|
|
transition: stroke-dasharray .1s ease-in-out, visibility 0s .1s;
|
2021-01-03 15:59:13 +00:00
|
|
|
}
|
2020-10-17 23:19:56 +00:00
|
|
|
}
|
2021-01-20 01:38:59 +00:00
|
|
|
|
|
|
|
.checkbox-box-background {
|
2021-01-20 02:02:43 +00:00
|
|
|
transition: transform .2s .05s ease-in-out;
|
2021-01-20 01:38:59 +00:00
|
|
|
transform: scale(0);
|
2020-10-17 23:19:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-20 01:38:59 +00:00
|
|
|
&:checked + .checkbox-box {
|
|
|
|
|
2020-10-17 23:19:56 +00:00
|
|
|
}
|
|
|
|
|
2021-01-20 01:38:59 +00:00
|
|
|
&:disabled + .checkbox-box, &:disabled ~ .checkbox-caption {
|
2020-10-17 23:19:56 +00:00
|
|
|
cursor: default;
|
|
|
|
opacity: .25;
|
|
|
|
}
|
|
|
|
}
|