_avatar.scss 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // user avatars
  2. .avatar {
  3. border-radius: 100%;
  4. position: relative;
  5. display: inline-block;
  6. vertical-align: middle;
  7. text-align: center;
  8. overflow: hidden;
  9. width: 50px;
  10. height: 50px;
  11. img {
  12. position: absolute;
  13. z-index: 2;
  14. top: 0;
  15. inset-inline-start: 0;
  16. inset-inline-end: 0;
  17. border: 0;
  18. object-fit: cover;
  19. width: 100%;
  20. height: 100%;
  21. }
  22. &.small {
  23. vertical-align: middle;
  24. margin: 0 0.5em;
  25. width: 25px;
  26. height: 25px;
  27. }
  28. &.large {
  29. width: 60px;
  30. height: 60px;
  31. @include media-breakpoint-up(sm) {
  32. width: 80px;
  33. height: 80px;
  34. }
  35. }
  36. &.square {
  37. border-radius: 0;
  38. }
  39. }
  40. .avatar--edit {
  41. overflow: visible;
  42. flex-shrink: 0;
  43. img {
  44. border-radius: 50%;
  45. z-index: auto;
  46. }
  47. }
  48. .avatar__edit-link {
  49. width: theme('spacing.5');
  50. height: theme('spacing.5');
  51. border-radius: 50%;
  52. border: theme('spacing.px') solid theme('colors.border-furniture');
  53. display: flex;
  54. align-items: center;
  55. justify-content: center;
  56. position: absolute;
  57. top: 100%;
  58. inset-inline-start: 50%;
  59. transform: translate(calc(var(--w-direction-factor) * -50%), -50%);
  60. background-color: theme('colors.surface-page');
  61. .icon {
  62. width: theme('spacing.[2.5]');
  63. height: theme('spacing.[2.5]');
  64. }
  65. }