2023-06-07 05:48:37 +03:00
|
|
|
.darkmode {
|
|
|
|
position: relative;
|
2023-06-18 20:47:07 +03:00
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
2023-07-04 20:08:32 +03:00
|
|
|
margin: 1rem;
|
2023-06-07 05:48:37 +03: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;
|
|
|
|
}
|
|
|
|
}
|