avatar.css 915 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. [data-component="avatar"] {
  2. --avatar-bg: var(--color-surface-info-base);
  3. display: flex;
  4. align-items: center;
  5. justify-content: center;
  6. flex-shrink: 0;
  7. border-radius: var(--radius-sm);
  8. border: 1px solid var(--color-border-weak-base);
  9. font-family: var(--font-mono);
  10. font-weight: 500;
  11. text-transform: uppercase;
  12. background-color: var(--avatar-bg);
  13. color: oklch(from var(--avatar-bg) calc(l * 0.72) calc(c * 8) h);
  14. }
  15. [data-component="avatar"][data-has-image] {
  16. background-color: transparent;
  17. border: none;
  18. }
  19. [data-component="avatar"][data-size="small"] {
  20. width: 1.25rem;
  21. height: 1.25rem;
  22. font-size: 0.75rem;
  23. line-height: 1;
  24. }
  25. [data-component="avatar"][data-size="normal"] {
  26. width: 1.5rem;
  27. height: 1.5rem;
  28. font-size: 1.125rem;
  29. line-height: 1.5rem;
  30. }
  31. [data-component="avatar"][data-size="large"] {
  32. width: 2rem;
  33. height: 2rem;
  34. font-size: 1.25rem;
  35. line-height: 2rem;
  36. }