mirror of https://github.com/kremalicious/ipfs.git
77 lines
1.4 KiB
CSS
77 lines
1.4 KiB
CSS
@import '../styles/_variables.css';
|
|
|
|
:root {
|
|
--knob-size: 8px;
|
|
--knob-space: 1px;
|
|
}
|
|
|
|
.themeSwitch {
|
|
position: relative;
|
|
display: inline-block;
|
|
margin-bottom: calc(var(--spacer) * var(--line-height));
|
|
margin-left: auto;
|
|
}
|
|
|
|
.themeSwitch svg {
|
|
width: 0.8rem;
|
|
height: 0.8rem;
|
|
margin-top: -0.05rem;
|
|
fill: var(--brand-grey-light);
|
|
}
|
|
|
|
.themeSwitch svg:last-child {
|
|
margin-top: -0.1rem;
|
|
width: 0.7rem;
|
|
height: 0.7rem;
|
|
}
|
|
|
|
.checkboxContainer {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.checkboxFake {
|
|
display: block;
|
|
position: relative;
|
|
width: calc(var(--knob-size) * 2.5);
|
|
height: calc(var(--knob-size) + calc(var(--knob-space) * 4));
|
|
border: 1px solid var(--brand-grey-light);
|
|
border-radius: 15rem;
|
|
margin-left: calc(var(--spacer) / 3);
|
|
margin-right: calc(var(--spacer) / 3);
|
|
}
|
|
|
|
.checkboxFake::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: var(--knob-space);
|
|
left: var(--knob-space);
|
|
width: var(--knob-size);
|
|
height: var(--knob-size);
|
|
background-color: var(--brand-grey-light);
|
|
border-radius: 15rem;
|
|
transition: transform 0.2s var(--easing);
|
|
transform: translate3d(0, 0, 0);
|
|
}
|
|
|
|
.checkbox {
|
|
position: relative;
|
|
cursor: pointer;
|
|
}
|
|
|
|
[type='checkbox']:checked + .checkboxContainer .checkboxFake::after {
|
|
transform: translate3d(100%, 0, 0);
|
|
}
|
|
|
|
[type='checkbox'],
|
|
.label {
|
|
width: 1px;
|
|
height: 1px;
|
|
border: 0;
|
|
clip: rect(0 0 0 0);
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
position: absolute;
|
|
}
|