/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
shared/common-adapters/avatar/avatar.css
175 строк
4 KB
chrisnojima
fix(avatar): restore nameless team placeholder, align team border radius (#29482)
29 июл 2026, 02:43
Не верифицирован
29 июл 2026, 02:43
68a9e44
Код
Авторство
О чём код?
/* Used by avatar on desktop to speed up perf */ /* Outer container allows follow icons to extend beyond bounds */ /* Inner wrapper has overflow:hidden + border-radius to clip images without re-rasterizing */ .avatar { user-select: none; flex-shrink: 0; position: relative; } .avatar-inner { overflow: hidden; position: relative; /* Help browser optimize repaints/compositing */ contain: layout style paint; } /* Outer container sizes - no border-radius so follow icons aren't clipped. --team-radius is inherited by the inner clip and the team border overlay so they always round identically. */ .avatar.avatar-team-size-128, .avatar.avatar-user-size-128 { width: 128px; height: 128px; --team-radius: 16px; } .avatar.avatar-team-size-16, .avatar.avatar-user-size-16 { width: 16px; height: 16px; --team-radius: 4px; } .avatar.avatar-team-size-24, .avatar.avatar-user-size-24 { width: 24px; height: 24px; --team-radius: 6px; } .avatar.avatar-team-size-32, .avatar.avatar-user-size-32 { width: 32px; height: 32px; --team-radius: 6px; } .avatar.avatar-team-size-48, .avatar.avatar-user-size-48 { width: 48px; height: 48px; --team-radius: 8px; } .avatar.avatar-team-size-64, .avatar.avatar-user-size-64 { width: 64px; height: 64px; --team-radius: 10px; } .avatar.avatar-team-size-96, .avatar.avatar-user-size-96 { width: 96px; height: 96px; --team-radius: 12px; } /* Inner wrapper sizes with border-radius for clipping */ .avatar-inner.avatar-team-size-128 { border-radius: var(--team-radius); width: 128px; height: 128px; } .avatar-inner.avatar-team-size-16 { border-radius: var(--team-radius); width: 16px; height: 16px; } .avatar-inner.avatar-team-size-24 { border-radius: var(--team-radius); width: 24px; height: 24px; } .avatar-inner.avatar-team-size-32 { border-radius: var(--team-radius); width: 32px; height: 32px; } .avatar-inner.avatar-team-size-48 { border-radius: var(--team-radius); width: 48px; height: 48px; } .avatar-inner.avatar-team-size-64 { border-radius: var(--team-radius); width: 64px; height: 64px; } .avatar-inner.avatar-team-size-96 { border-radius: var(--team-radius); width: 96px; height: 96px; } .avatar-inner.avatar-user-size-128 { border-radius: 50%; width: 128px; height: 128px; } .avatar-inner.avatar-user-size-16 { border-radius: 50%; width: 16px; height: 16px; } .avatar-inner.avatar-user-size-24 { border-radius: 50%; width: 24px; height: 24px; } .avatar-inner.avatar-user-size-32 { border-radius: 50%; width: 32px; height: 32px; } .avatar-inner.avatar-user-size-48 { border-radius: 50%; width: 48px; height: 48px; } .avatar-inner.avatar-user-size-64 { border-radius: 50%; width: 64px; height: 64px; } .avatar-inner.avatar-user-size-96 { border-radius: 50%; width: 96px; height: 96px; } /* Background layer - no border-radius needed, parent clips via overflow */ .avatar-background { background-color: light-dark(var(--color-greyLight), #0f0f0f); position: absolute; inset: 0; } /* Image layer - no border-radius needed, parent clips via overflow */ .avatar-user-image { flex-shrink: 0; background-size: cover; position: absolute; inset: 0; } .avatar-border-team { border-radius: var(--team-radius, 8px); background: rgba(0, 0, 0, 0); flex-shrink: 0; position: absolute; inset: 0; } @media (prefers-color-scheme: dark) { .avatar-border-team { background: rgba(255, 255, 255, 0); } } .avatar-border { background: rgba(0, 0, 0, 0); } @media (prefers-color-scheme: dark) { .avatar-border { background: rgba(255, 255, 255, 0); } }