2018-10-27 14:29:13 +00:00
|
|
|
.input__checkbox {
|
|
|
|
display: inline-flex;
|
|
|
|
margin: 1px 0;
|
2019-04-17 23:59:33 +00:00
|
|
|
|
|
|
|
&:not(&--disabled) {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2018-10-27 14:29:13 +00:00
|
|
|
|
2018-10-27 14:50:46 +00:00
|
|
|
&--radio &__display,
|
|
|
|
&--radio &__display__icon {
|
|
|
|
border-radius: 100%;
|
|
|
|
}
|
|
|
|
|
2018-10-27 14:29:13 +00:00
|
|
|
&__input {
|
|
|
|
display: inline-block;
|
|
|
|
position: absolute;
|
|
|
|
z-index: -1000;
|
2019-04-17 23:59:33 +00:00
|
|
|
visibility: hidden;
|
2018-10-27 14:29:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__display {
|
|
|
|
display: inline-block;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
border: 1px solid #222;
|
|
|
|
background: #222;
|
|
|
|
color: #fff;
|
|
|
|
border-radius: 2px;
|
|
|
|
box-shadow: inset 0 0 4px #111;
|
|
|
|
transition: border-color .2s;
|
|
|
|
|
|
|
|
&__icon {
|
|
|
|
background-color: var(--accent-colour);
|
|
|
|
background-size: 28px 28px;
|
|
|
|
background-image: radial-gradient(ellipse at center, fade(#fff, 20%) 0%, fade(#000, 40%) 100%);
|
|
|
|
box-shadow: 0 0 2px #111;
|
|
|
|
border-radius: 2px;
|
|
|
|
margin: 2px;
|
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
opacity: 0;
|
|
|
|
transition: opacity .2s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__input:checked ~ &__display &__display__icon {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
2019-04-17 23:59:33 +00:00
|
|
|
&:not(&--disabled):hover &__display,
|
|
|
|
&:not(&--disabled) &__input:focus ~ &__display {
|
2018-10-27 14:29:13 +00:00
|
|
|
border-color: var(--accent-colour);
|
|
|
|
}
|
|
|
|
|
|
|
|
&__text {
|
|
|
|
display: inline-block;
|
|
|
|
margin-left: 4px;
|
|
|
|
}
|
2019-04-17 23:59:33 +00:00
|
|
|
|
|
|
|
&--disabled {
|
|
|
|
opacity: .5;
|
|
|
|
}
|
2018-10-27 14:29:13 +00:00
|
|
|
}
|