BigW Consortium Gitlab

avatar.scss 2.12 KB
Newer Older
1 2 3 4 5 6
@mixin avatar-size($size, $margin-right) {
  width: $size;
  height: $size;
  margin-right: $margin-right;
}

7
.avatar-circle {
8
  float: left;
9 10
  margin-right: 15px;
  border-radius: $avatar_radius;
11
  border: 1px solid $avatar-border;
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
  &.s16 { @include avatar-size(16px, 6px); }
  &.s20 { @include avatar-size(20px, 7px); }
  &.s24 { @include avatar-size(24px, 8px); }
  &.s26 { @include avatar-size(26px, 8px); }
  &.s32 { @include avatar-size(32px, 10px); }
  &.s36 { @include avatar-size(36px, 10px); }
  &.s40 { @include avatar-size(40px, 10px); }
  &.s46 { @include avatar-size(46px, 15px); }
  &.s48 { @include avatar-size(48px, 10px); }
  &.s60 { @include avatar-size(60px, 12px); }
  &.s70 { @include avatar-size(70px, 14px); }
  &.s90 { @include avatar-size(90px, 15px); }
  &.s110 { @include avatar-size(110px, 15px); }
  &.s140 { @include avatar-size(140px, 15px); }
  &.s160 { @include avatar-size(160px, 20px); }
}

.avatar {
30
  @extend .avatar-circle;
31
  width: 40px;
32 33
  height: 40px;
  padding: 0;
34 35 36

  &.avatar-inline {
    float: none;
37
    display: inline-block;
38 39
    margin-left: 4px;
    margin-bottom: 2px;
40

41 42
    &.s16 { margin-right: 4px; }
    &.s24 { margin-right: 4px; }
43 44
  }

45 46 47 48 49 50
  &.center {
    font-size: 14px;
    line-height: 1.8em;
    text-align: center;
  }

51
  &.avatar-tile {
Clement Ho committed
52
    border-radius: 0;
53
    border: none;
54
  }
55
}
56 57 58 59 60 61

.identicon {
  text-align: center;
  vertical-align: top;

  &.s16 { font-size: 12px; line-height: 1.33; }
62
  &.s24 { font-size: 14px; line-height: 1.8; }
63
  &.s26 { font-size: 20px; line-height: 1.33; }
64 65 66 67 68 69 70 71
  &.s32 { font-size: 20px; line-height: 30px; }
  &.s40 { font-size: 16px; line-height: 38px; }
  &.s60 { font-size: 32px; line-height: 58px; }
  &.s70 { font-size: 34px; line-height: 68px; }
  &.s90 { font-size: 36px; line-height: 88px; }
  &.s110 { font-size: 40px; line-height: 108px; font-weight: 300; }
  &.s140 { font-size: 72px; line-height: 138px; }
  &.s160 { font-size: 96px; line-height: 158px; }
72
}
73

74 75
.avatar-container {
  @extend .avatar-circle;
76 77 78 79 80 81 82
  overflow: hidden;
  display: flex;

  .avatar {
    border-radius: 0;
    border: none;
    height: auto;
83
    width: 100%;
84 85 86
    margin: 0;
    align-self: center;
  }
87
}