mirror of
https://git.kittycat.homes/zoe/hugo-battheme.git
synced 2024-08-15 03:25:18 +00:00
45 lines
723 B
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: "";
|
|
}
|