2023-06-07 09:48:37 +07:00
|
|
|
.darkmode {
|
|
|
|
position: relative;
|
2023-06-19 00:47:07 +07:00
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
2023-06-07 09:48:37 +07:00
|
|
|
|
|
|
|
& > .toggle {
|
|
|
|
display: none;
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
& svg {
|
|
|
|
cursor: pointer;
|
|
|
|
opacity: 0;
|
|
|
|
position: absolute;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
top: calc(50% - 10px);
|
|
|
|
fill: var(--darkgray);
|
|
|
|
transition: opacity 0.1s ease;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
:root[saved-theme="dark"] .toggle ~ label {
|
|
|
|
& > #dayIcon {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
& > #nightIcon {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
:root .toggle ~ label {
|
|
|
|
& > #dayIcon {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
& > #nightIcon {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|