keroosha.cybergulag.today/quartz/components/styles/darkmode.scss

49 lines
687 B
SCSS
Raw Permalink Normal View History

2023-06-07 05:48:37 +03:00
.darkmode {
position: relative;
2023-06-18 20:47:07 +03:00
width: 20px;
height: 20px;
margin: 0 10px;
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;
}
}
2023-09-17 20:29:20 +03:00
:root[saved-theme="dark"] {
color-scheme: dark;
}
:root[saved-theme="light"] {
color-scheme: light;
}
2023-06-07 05:48:37 +03:00
:root[saved-theme="dark"] .toggle ~ label {
& > #dayIcon {
opacity: 0;
}
& > #nightIcon {
opacity: 1;
}
}
:root .toggle ~ label {
& > #dayIcon {
opacity: 1;
}
& > #nightIcon {
opacity: 0;
}
}