2018-05-10 16:06:17 +02:00
|
|
|
@import 'variables';
|
|
|
|
|
|
|
|
.themeswitch {
|
|
|
|
position: absolute;
|
|
|
|
top: $spacer / 2;
|
|
|
|
right: $spacer;
|
|
|
|
z-index: 10;
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
width: .8rem;
|
|
|
|
height: .8rem;
|
2018-05-10 20:56:58 +02:00
|
|
|
margin-top: -.05rem;
|
2018-05-10 16:06:17 +02:00
|
|
|
fill: $brand-grey-light;
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
margin-top: -.1rem;
|
|
|
|
width: .7rem;
|
|
|
|
height: .7rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.dark & {
|
|
|
|
fill: $brand-grey;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.checkbox__faux-container {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
2018-05-10 20:56:58 +02:00
|
|
|
$knob-size: 8px;
|
|
|
|
$knob-space: 1px;
|
|
|
|
|
2018-05-10 16:06:17 +02:00
|
|
|
.checkbox__faux {
|
|
|
|
display: block;
|
|
|
|
position: relative;
|
2018-05-10 20:56:58 +02:00
|
|
|
width: ($knob-size + ($knob-space * 2)) * 2;
|
|
|
|
height: $knob-size + ($knob-space * 4);
|
|
|
|
border: 1px solid $brand-grey-light;
|
2018-05-10 16:06:17 +02:00
|
|
|
border-radius: 15rem;
|
|
|
|
margin-left: $spacer / 3;
|
|
|
|
margin-right: $spacer / 3;
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
2018-05-10 20:56:58 +02:00
|
|
|
top: $knob-space;
|
|
|
|
left: $knob-space;
|
|
|
|
width: $knob-size;
|
|
|
|
height: $knob-size;
|
|
|
|
background-color: $brand-grey-light;
|
2018-05-10 16:06:17 +02:00
|
|
|
border-radius: 15rem;
|
|
|
|
transition: transform .2s $easing;
|
|
|
|
transform: translate3d(0, 0, 0);
|
|
|
|
}
|
2018-05-10 20:56:58 +02:00
|
|
|
|
|
|
|
.dark & {
|
|
|
|
border-color: $brand-grey;
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
background-color: $brand-grey;
|
|
|
|
}
|
|
|
|
}
|
2018-05-10 16:06:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.checkbox {
|
|
|
|
position: relative;
|
|
|
|
cursor: pointer;
|
2018-05-10 20:56:58 +02:00
|
|
|
opacity: .6;
|
|
|
|
|
|
|
|
.dark & {
|
|
|
|
opacity: .8;
|
|
|
|
}
|
2018-05-10 16:06:17 +02:00
|
|
|
|
|
|
|
[type="checkbox"],
|
|
|
|
.checkbox__label {
|
|
|
|
width: 1px;
|
|
|
|
height: 1px;
|
|
|
|
border: 0;
|
|
|
|
clip: rect(0 0 0 0);
|
|
|
|
margin: -1px;
|
|
|
|
overflow: hidden;
|
|
|
|
padding: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
|
|
|
|
[type="checkbox"] {
|
|
|
|
&:checked {
|
|
|
|
+ .checkbox__faux-container {
|
|
|
|
.checkbox__faux {
|
|
|
|
&::after {
|
|
|
|
transform: translate3d(100%, 0, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|