Summary Files Commits Branches @commit @diff @stats
path: root / src / avatars.less
blob: 1fa075a8b0b641533868e6db8f2d63c68388536d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Avatars
.avatar {
  .avatar-base();
  background: @primary-color;
  border-radius: 50%;
  color: fade(@light-color, 85%);
  display: inline-block;
  font-weight: 300;
  line-height: 1;
  margin: 0;
  position: relative;
  vertical-align: middle;

  &.avatar-xs {
    .avatar-base(@unit-4);
  }
  &.avatar-sm {
    .avatar-base(@unit-6);
  }
  &.avatar-lg {
    .avatar-base(@unit-12);
  }
  &.avatar-xl {
    .avatar-base(@unit-16);
  }

  img {
    border-radius: 50%;
    height: 100%;
    position: relative;
    width: 100%;
    z-index: @zindex-0;
  }

  .avatar-icon,
  .avatar-presence {
    background: @bg-color-light;
    bottom: 14.64%;
    height: 50%;
    padding: @border-width-lg;
    position: absolute;
    right: 14.64%;
    transform: translate(50%, 50%);
    width: 50%;
    z-index: @zindex-0 + 1;
  }

  .avatar-presence {
    background: @gray-color;
    box-shadow: 0 0 0 @border-width-lg @light-color;
    border-radius: 50%;
    height: .5em;
    width: .5em;

    &.online {
      background: @success-color;
    }

    &.busy {
      background: @error-color;
    }

    &.away {
      background: @warning-color;
    }
  }

  &[data-initial]::before {
    color: currentColor;
    content: attr(data-initial);
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: @zindex-0;
  }
}