aboutsummaryrefslogtreecommitdiff
path: root/src/components/avatar_list/avatar_list.vue
blob: 077d002d90dc3f2fdefd32cc08dbc5e7b28886d9 (plain)
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
<template>
  <ul class="avatars" :class="{ 'transparent-avatar': slicedAvatars.length == 15 }">
      <li class="avatars-item" v-for="(avatar, index) in slicedAvatars" :key="`avatar-${index}`">
        <UserAvatar :src="avatar.profile_image_url" class="avatars-img" />
      </li>
  </ul>
</template>

<script src="./avatar_list.js" ></script>

<style lang="scss">
@import '../../_variables.scss';
.avatars {
  display: inline-flex; /* Causes LI items to display in row. */
  list-style-type: none;
  margin: 0;
  padding: 0;

  li.avatars-item {
    height: 24px;
    width: 24px;
    margin: 0 5px 0 0;

    &:first-child {
      padding-left: 12px;
    }

    &:last-child {
      margin-right: 0;
    }

    .avatars-img {
      border-radius: $fallback--avatarAltRadius;
      border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
      height: 24px;
      width: 24px;
      background-color: $fallback--lightText;
      background-color: var(--lightText, $fallback--lightText);
    }
  }
}

.transparent-avatar {
  .avatars-item {
    &:first-child {
      position: relative;

      .avatars-img {
        &::after {
          content: '';
          position: absolute;
          width: 100%;
          height: 100%;
          background-color: $fallback--faint;
          background-color: var(--faint, $fallback--faint);
          left: 0;
          top: 0;
        }
      }
    }
  }
}
</style>