refactor animal avatar font-size to automatically scale with parents

This commit is contained in:
ansuz 2021-08-25 12:59:37 +05:30
parent 8d579c0376
commit c630abb3c5
2 changed files with 7 additions and 4 deletions

View File

@ -40,7 +40,13 @@
color: @cp_avatar-fg;
font-size: @avatar-font-size;
font-size: var(--avatar-font-size);
text-transform: capitalize;
.animal {
font-size: 20px;
// scale animal avatar to be somewhat larger, because:
// 1. emojis are wider than most latin characters
// 2. they should occupy the width of two average characters
font-size: calc(var(--avatar-width) * (6/5));
}
}
media-tag {
min-height: @avatar-width;

View File

@ -200,9 +200,6 @@
.avatar_main(30px);
.cp-avatar-default, media-tag {
margin-right: 5px;
&.animal {
font-size: 20px;
}
}
&.cp-userlist-clickable {
cursor: pointer;