mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-23 03:56:23 +00:00
39 lines
561 B
SCSS
39 lines
561 B
SCSS
.darkmode {
|
|
position: relative;
|
|
width: 20px;
|
|
height: 20px;
|
|
|
|
& > .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;
|
|
}
|
|
}
|