_avatars.scss 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Avatars
  2. .avatar {
  3. @include avatar-base();
  4. background: $primary-color;
  5. border-radius: 50%;
  6. color: rgba($light-color, .85);
  7. display: inline-block;
  8. font-weight: 300;
  9. line-height: 1.25;
  10. margin: 0;
  11. position: relative;
  12. vertical-align: middle;
  13. &.avatar-xs {
  14. @include avatar-base($unit-4);
  15. }
  16. &.avatar-sm {
  17. @include avatar-base($unit-6);
  18. }
  19. &.avatar-lg {
  20. @include avatar-base($unit-12);
  21. }
  22. &.avatar-xl {
  23. @include avatar-base($unit-16);
  24. }
  25. img {
  26. border-radius: 50%;
  27. height: 100%;
  28. position: relative;
  29. width: 100%;
  30. z-index: $zindex-0;
  31. }
  32. .avatar-icon,
  33. .avatar-presence {
  34. background: $bg-color-light;
  35. bottom: 14.64%;
  36. height: 50%;
  37. padding: $border-width-lg;
  38. position: absolute;
  39. right: 14.64%;
  40. transform: translate(50%, 50%);
  41. width: 50%;
  42. z-index: $zindex-0 + 1;
  43. }
  44. .avatar-presence {
  45. background: $gray-color;
  46. box-shadow: 0 0 0 $border-width-lg $light-color;
  47. border-radius: 50%;
  48. height: .5em;
  49. width: .5em;
  50. &.online {
  51. background: $success-color;
  52. }
  53. &.busy {
  54. background: $error-color;
  55. }
  56. &.away {
  57. background: $warning-color;
  58. }
  59. }
  60. &[data-initial]::before {
  61. color: currentColor;
  62. content: attr(data-initial);
  63. left: 50%;
  64. position: absolute;
  65. top: 50%;
  66. transform: translate(-50%, -50%);
  67. z-index: $zindex-0;
  68. }
  69. }