hugo-battheme/assets/scss/style.scss

45 lines
723 B
SCSS

$radius: 24pt;
$toggle-width: 42pt;
$toggle-height: 24pt;
input[type="checkbox"]{
cursor: pointer;
}
.toggleinput{
opacity: 0;
max-height: 0;
overflow: hidden;
}
.togglelabel{
width: $toggle-width;
height: 24pt;
border-radius: $radius;
cursor: pointer;
}
.togglelabel::after{
left: calc(100% - 66pt);
content: "";
position: absolute;
height: $toggle-height;
width: $toggle-height;
border-radius: 100pt;
transition: 0.3s;
display: inline-block;
vertical-align: middle;
text-align: center;
}
input:checked + label:after{
left: calc(100% - 48pt);
}
.togglelabel::after{
content: "";
}
input:checked + label::after{
content: "";
}