alexohneander-zola/sass/parts/_theme-switch.scss
welpo 4f7e25b01e
💄style: set consistent no border radius
Only border radius left is main picture.
2023-02-08 22:13:39 +01:00

44 lines
699 B
SCSS

.theme-switcher {
align-self: center;
margin-left: 0.5rem;
width: 1rem;
height: 1rem;
position: relative;
cursor: pointer;
.switch {
width: 1rem;
height: 1rem;
position: absolute;
left: 0px;
transition: all 0.3s ease-in-out;
display: flex;
justify-content: center;
align-items: center;
img {
width: 100%;
height: auto;
position: absolute;
transition: all 0.2s ease-in-out;
border: none;
}
.sun {
opacity: 1;
}
.moon {
opacity: 0;
}
}
input {
display: none;
&:checked + .switch {
.sun {
opacity: 0;
}
.moon {
opacity: 1;
}
}
}
}