keroosha.cybergulag.today/assets/darkmode.scss

44 lines
625 B
SCSS
Raw Normal View History

2021-07-18 16:35:42 +03:00
.darkmode {
2021-08-27 21:08:11 +03:00
float: right;
padding: 1em;
min-width: 30px;
position: relative;
@media all and (max-width: 450px) {
padding: 1em;
}
2021-07-18 16:35:42 +03:00
& > .toggle {
display: none;
box-sizing: border-box;
}
2021-08-27 21:08:11 +03:00
& svg {
opacity: 0;
position: absolute;
2021-07-18 16:35:42 +03:00
width: 20px;
height: 20px;
2021-08-27 21:08:11 +03:00
top: calc(50% - 10px);
2021-07-18 16:35:42 +03:00
margin: 0 7px;
fill: var(--gray);
2021-08-27 21:08:11 +03:00
transition: opacity 0.1s ease;
2021-07-18 16:35:42 +03:00
}
2021-08-27 21:08:11 +03:00
}
2021-07-18 16:35:42 +03:00
2021-08-27 21:08:11 +03:00
.toggle:checked ~ label {
& > #dayIcon {
opacity: 0;
}
& > #nightIcon {
opacity: 1;
}
}
.toggle:not(:checked) ~ label {
& > #dayIcon {
opacity: 1;
}
& > #nightIcon {
opacity: 0;
2021-07-18 16:35:42 +03:00
}
}