Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

1.8 KB
Raw Blame
.sui-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  color: var(--color-text-on-accent);
  font-family: var(--font-sans);
  overflow: hidden;
  flex-shrink: 0;
}

/* Trimmed to the cap height so the letter, not the font's line box, is what gets
   centred: fallback fonts (no Inter is bundled) sit capitals ~1.5px low. */
.sui-avatar__initials {
  display: block;
  line-height: 1;
  letter-spacing: 0.02em;
  text-indent: 0.02em;
  text-box: trim-both cap alphabetic;
}

.sui-avatar--interactive {
  cursor: pointer;
  transition: transform var(--motion-fast);
}
.sui-avatar--interactive:hover {
  transform: scale(1.05);
}

.sui-avatar--xs {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.625rem;
}
.sui-avatar--sm {
  width: 1.625rem;
  height: 1.625rem;
  font-size: 0.6875rem;
}
.sui-avatar--md {
  width: 2rem;
  height: 2rem;
  font-size: 0.8125rem;
}
.sui-avatar--lg {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
}
/* Account-settings hero disc. */
.sui-avatar--xl {
  width: 4.5rem;
  height: 4.5rem;
  font-size: 1.75rem;
}

.sui-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ground for a picture, which brings its own. Opaque uploads cover it entirely;
   a logo with an alpha channel gets the app surface rather than a tone. */
.sui-avatar--image {
  background: var(--c-surface);
}

.sui-avatar--blue {
  background: var(--grad-blue-btn);
}
.sui-avatar--purple {
  background: var(--grad-purple-btn);
}
.sui-avatar--green {
  background: var(--grad-green-btn);
}
.sui-avatar--amber {
  background: var(--grad-amber-btn);
}
.sui-avatar--red {
  background: var(--grad-red-btn);
}
.sui-avatar--neutral {
  background: var(--c-surface-sunken);
  color: var(--c-text-muted);
}