avatar.scss 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. // =========================================================================================
  2. // File Name: avatar.scss
  3. // Description: Avatar style.
  4. // ----------------------------------------------------------------------------------------
  5. // Item Name: Vuexy - Vuejs, React, Angular, HTML & Laravel Admin Dashboard Template
  6. // Author: PIXINVENT
  7. // Author URL: http://www.themeforest.net/user/pixinvent
  8. // ==========================================================================================
  9. // Component: Avatar
  10. // ========================================================================
  11. // avatar
  12. .avatar {
  13. white-space: nowrap;
  14. background-color: $avatar-bg;
  15. border-radius: 50%;
  16. position: relative;
  17. cursor: pointer;
  18. color: $white;
  19. display: inline-flex;
  20. font-size: 1rem;
  21. text-align: center;
  22. vertical-align: middle;
  23. font-weight: 600;
  24. // avatar content
  25. .avatar-content {
  26. width: $avatar-size;
  27. height: $avatar-size;
  28. display: flex;
  29. justify-content: center;
  30. align-items: center;
  31. border-radius: 50%;
  32. font-size: 0.857rem;
  33. .avatar-icon {
  34. height: 1rem;
  35. width: 1rem;
  36. }
  37. }
  38. [class*='avatar-status-'] {
  39. border-radius: 50%;
  40. width: $avatar-status-size;
  41. height: $avatar-status-size;
  42. position: absolute;
  43. right: 0;
  44. bottom: 0;
  45. border: 1px solid $white;
  46. &.avatar-status-lg,
  47. &.avatar-status-xl {
  48. width: $avatar-status-size-lg;
  49. height: $avatar-status-size-lg;
  50. border-width: 2px;
  51. }
  52. }
  53. .avatar-status-online {
  54. background-color: $success;
  55. }
  56. .avatar-status-busy {
  57. background-color: $danger;
  58. }
  59. .avatar-status-away {
  60. background-color: $warning;
  61. }
  62. .avatar-status-offline {
  63. background-color: $secondary;
  64. }
  65. // avatar label with basic size
  66. // using in FAQ & other pages
  67. &.avatar-tag {
  68. display: flex;
  69. align-items: center;
  70. justify-content: center;
  71. height: 42px;
  72. width: 42px;
  73. border-radius: $border-radius;
  74. }
  75. // avatar img
  76. img {
  77. border-radius: 50%;
  78. }
  79. // Size Modifier
  80. // ========================================================================
  81. &.avatar-xl {
  82. font-size: 1.5rem;
  83. img {
  84. width: $avatar-size-xl;
  85. height: $avatar-size-xl;
  86. }
  87. .avatar-content {
  88. height: $avatar-size-xl;
  89. width: $avatar-size-xl;
  90. font-size: 2.57rem;
  91. .avatar-icon,
  92. i,
  93. svg {
  94. height: 3rem;
  95. width: 3rem;
  96. font-size: 3rem;
  97. }
  98. }
  99. [class*='avatar-status-'] {
  100. right: 3px;
  101. bottom: 0;
  102. }
  103. }
  104. &.avatar-lg {
  105. font-size: 1.2rem;
  106. img {
  107. width: $avatar-size-lg;
  108. height: $avatar-size-lg;
  109. }
  110. .avatar-content {
  111. width: $avatar-size-lg;
  112. height: $avatar-size-lg;
  113. font-size: 1.714rem;
  114. .avatar-icon,
  115. i,
  116. svg {
  117. height: 2rem;
  118. width: 2rem;
  119. font-size: 2rem;
  120. }
  121. }
  122. [class*='avatar-status-'] {
  123. right: 3px;
  124. bottom: 1px;
  125. }
  126. }
  127. &.avatar-sm {
  128. .avatar-content {
  129. width: $avatar-size-sm;
  130. height: $avatar-size-sm;
  131. .avatar-icon,
  132. i,
  133. svg {
  134. height: 1rem;
  135. width: 1rem;
  136. font-size: 1rem;
  137. }
  138. }
  139. img {
  140. width: $avatar-size-sm;
  141. height: $avatar-size-sm;
  142. }
  143. [class*='avatar-status-'] {
  144. right: -3px;
  145. bottom: -2px;
  146. }
  147. }
  148. }
  149. // Avatar Group SCSS
  150. .avatar-group {
  151. display: flex;
  152. justify-content: flex-start;
  153. .avatar {
  154. transition: all 0.25s ease;
  155. img,
  156. .avatar-content {
  157. box-shadow: 0 0 0 2px $avatar-group-border, inset 0 0 0 1px rgba($black, 0.07);
  158. }
  159. .avatar-content {
  160. background-color: lighten(theme-color('secondary'), 20%) !important;
  161. }
  162. &:hover {
  163. transition: all 0.25s ease;
  164. }
  165. &.pull-up:hover {
  166. transform: translateY(-4px) scale(1.07);
  167. }
  168. }
  169. // Avatar Group Sizings
  170. .avatar:not(:first-child) {
  171. margin-left: -0.55rem;
  172. }
  173. .avatar-sm:not(:first-child) {
  174. margin-left: -0.4rem;
  175. }
  176. .avatar-lg:not(:first-child) {
  177. margin-left: -1rem;
  178. }
  179. .avatar-xl:not(:first-child) {
  180. margin-left: -1.5rem;
  181. }
  182. }