Fix alpha avatars

This commit is contained in:
Lim Chee Aun 2023-11-05 20:09:57 +08:00
parent 540b9a15a4
commit 8d41ff6884

View file

@ -8,15 +8,21 @@
box-shadow: 0 0 0 1px var(--bg-blur-color); box-shadow: 0 0 0 1px var(--bg-blur-color);
flex-shrink: 0; flex-shrink: 0;
vertical-align: middle; vertical-align: middle;
}
.avatar.has-alpha { &.has-alpha {
border-radius: 0; border-radius: 0;
background-color: transparent;
box-shadow: none;
img {
background-color: transparent;
} }
.avatar:not(.has-alpha).squircle { }
&:not(.has-alpha).squircle {
border-radius: 25%; border-radius: 25%;
} }
.avatar img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
@ -24,8 +30,9 @@
contain: none; contain: none;
} }
.avatar[data-loaded], &[data-loaded],
.avatar[data-loaded] img { &[data-loaded] img {
box-shadow: none; box-shadow: none;
background-color: transparent; background-color: transparent;
} }
}