File size: 3,505 Bytes
aa09c01 a0b96b1 aa09c01 a0b96b1 6b2bf82 aa09c01 a0b96b1 aa09c01 a0b96b1 aa09c01 62809b0 aa09c01 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | /* ---------------------------------------------------------------------------
Connected users pill (editor top bar)
Small overlapping avatars of everyone else currently editing the
document. Each avatar's border matches the user's collab color
(same color as their cursor caret in the document), so it's easy
to tell at a glance who's behind a given selection.
--------------------------------------------------------------------------- */
.connected-users {
display: inline-flex;
align-items: center;
padding: 0 6px 0 4px;
}
.connected-users__avatar {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
border-radius: 50%;
/* No overflow:hidden here: the circular clip lives on the img/initials so
the count badge can sit on top of (and slightly outside) the avatar. */
border: 2px solid var(--border-color);
background: var(--surface-bg);
margin-left: -6px;
transition: transform 120ms ease, z-index 0s;
z-index: 1;
}
.connected-users__avatar:first-child {
margin-left: 0;
}
.connected-users__avatar:hover {
transform: translateY(-1px) scale(1.08);
z-index: 3;
}
/* Keep badged avatars above their right-hand neighbour so the count
(which sits on the right edge, where avatars overlap) stays visible.
Driven by an explicit class rather than :has() for reliable support. */
.connected-users__avatar--multi {
z-index: 2;
}
.connected-users__avatar img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
border-radius: 50%;
}
.connected-users__initials {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
font-weight: 700;
color: #fff;
text-transform: uppercase;
line-height: 1;
border-radius: 50%;
}
.connected-users__count {
position: absolute;
bottom: -3px;
right: -4px;
min-width: 14px;
height: 14px;
padding: 0 3px;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
border-radius: 7px;
background: var(--primary-color);
color: var(--on-primary, #fff);
font-size: 9px;
font-weight: 700;
line-height: 1;
border: 1.5px solid var(--surface-bg);
font-variant-numeric: tabular-nums;
}
/* Agents are buttons (they open the "Undo its changes" menu). */
.connected-users > .top-bar__menu {
margin-left: -6px;
}
.connected-users > .top-bar__menu:first-child {
margin-left: 0;
}
.connected-users__avatar--agent {
padding: 0;
cursor: pointer;
border-style: dashed;
}
.connected-users__avatar--agent:focus-visible {
outline: 2px solid var(--primary-color);
outline-offset: 2px;
}
.connected-users__agent-badge {
position: absolute;
bottom: -3px;
right: -4px;
width: 13px;
height: 13px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: var(--text-color);
color: var(--page-bg);
border: 1.5px solid var(--surface-bg);
}
.connected-users__menu-head {
padding: 0.45rem 0.6rem 0.3rem;
font-size: 0.75rem;
color: var(--muted-color);
}
.connected-users__menu-head strong {
color: var(--text-color);
}
.connected-users__more {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
border-radius: 50%;
background: var(--surface-bg);
color: var(--muted-color);
font-size: 11px;
font-weight: 700;
border: 2px solid var(--border-color);
margin-left: -6px;
}
|