.avatar {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background-color: var(attr(data-color-class));

  &[data-size="xs"] {
    height: 1rem;
    width: 1rem;
    min-width: 1rem;
  }

  &[data-size="sm"] {
    height: 1.25rem;
    width: 1.25rem;
    min-width: 1.25rem;
  }
  
  &[data-size="md"] {
    height: 1.5rem;
    width: 1.5rem;
    min-width: 1.5rem;
  }

  &[data-size="lg"] {
    height: 2rem;
    width: 2rem;
    min-width: 2rem;
  }

  &[data-size="xl"] {
    height: 4rem;
    width: 4rem;
    min-width: 4rem;
  }
}

/* A person's uploaded photo, shown in the same circle their initials would be. */
img.avatar--photo {
  object-fit: cover;
  object-position: center center;
}