alexandria/quartz/components/styles/darkmode.scss

47 lines
678 B
SCSS
Raw Permalink Normal View History

2024-12-29 02:11:31 -08:00
.darkmode {
cursor: pointer;
padding: 0;
position: relative;
background: none;
border: none;
width: 20px;
height: 20px;
margin: 0 10px;
text-align: inherit;
& svg {
position: absolute;
width: 20px;
height: 20px;
top: calc(50% - 10px);
fill: var(--darkgray);
transition: opacity 0.1s ease;
}
}
:root[saved-theme="dark"] {
color-scheme: dark;
}
:root[saved-theme="light"] {
color-scheme: light;
}
:root[saved-theme="dark"] .darkmode {
& > #dayIcon {
display: none;
}
& > #nightIcon {
display: inline;
}
}
:root .darkmode {
& > #dayIcon {
display: inline;
}
& > #nightIcon {
display: none;
}
}