forked from Mirrors/gomuks
web/roomlist: prevent overflow in unread counters (#541)
This commit is contained in:
parent
0133e7c037
commit
4ea43b77c7
1 changed files with 12 additions and 6 deletions
|
@ -106,22 +106,28 @@ div.room-entry {
|
||||||
width: 3rem;
|
width: 3rem;
|
||||||
|
|
||||||
> div.unread-count {
|
> div.unread-count {
|
||||||
|
--unread-count-size: 1rem;
|
||||||
|
--unread-count-padding-inline: calc(var(--unread-count-size)/4);
|
||||||
|
--unread-count-padding-block: calc(var(--unread-count-size)/8);
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-radius: 50%;
|
border-radius: var(--unread-count-size);
|
||||||
color: var(--unread-counter-text-color);
|
color: var(--unread-counter-text-color);
|
||||||
|
|
||||||
background-color: var(--unread-counter-message-bg);
|
background-color: var(--unread-counter-message-bg);
|
||||||
width: 1rem;
|
height: var(--unread-count-size);
|
||||||
height: 1rem;
|
min-width: calc(var(--unread-count-size) - 2*(var(--unread-count-padding-inline) - var(--unread-count-padding-block)));
|
||||||
|
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-size: .75em;
|
font-size: .75em;
|
||||||
|
|
||||||
|
padding-inline: var(--unread-count-padding-inline);
|
||||||
|
padding-block: var(--unread-count-padding-block);
|
||||||
|
|
||||||
&.notified, &.marked-unread, &.highlighted {
|
&.notified, &.marked-unread, &.highlighted {
|
||||||
width: 1.5rem;
|
--unread-count-size: 1.5rem;
|
||||||
height: 1.5rem;
|
|
||||||
padding-bottom: 0;
|
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue