avatar.css 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. [data-component="avatar"] {
  2. --avatar-bg: var(--color-surface-info-base);
  3. --avatar-fg: var(--color-text-base);
  4. display: flex;
  5. align-items: center;
  6. justify-content: center;
  7. flex-shrink: 0;
  8. border-radius: var(--radius-sm);
  9. border: 1px solid var(--color-border-weak-base);
  10. font-family: var(--font-mono);
  11. font-weight: 500;
  12. text-transform: uppercase;
  13. background-color: var(--avatar-bg);
  14. color: var(--avatar-fg);
  15. }
  16. [data-component="avatar"][data-has-image] {
  17. background-color: transparent;
  18. border: none;
  19. }
  20. [data-component="avatar"][data-size="small"] {
  21. width: 1.25rem;
  22. height: 1.25rem;
  23. font-size: 0.75rem;
  24. line-height: 1;
  25. }
  26. [data-component="avatar"][data-size="normal"] {
  27. width: 1.5rem;
  28. height: 1.5rem;
  29. font-size: 1.125rem;
  30. line-height: 1.5rem;
  31. }
  32. [data-component="avatar"][data-size="large"] {
  33. width: 2rem;
  34. height: 2rem;
  35. font-size: 1.25rem;
  36. line-height: 2rem;
  37. }
  38. [data-component="avatar"] [data-slot="avatar-image"] {
  39. width: 100%;
  40. height: 100%;
  41. display: block;
  42. object-fit: cover;
  43. border-radius: inherit;
  44. }