aboutsummaryrefslogtreecommitdiff
path: root/src/components/avatar_list
diff options
context:
space:
mode:
authorshpuld <shp@cock.li>2019-04-17 18:28:44 +0300
committershpuld <shp@cock.li>2019-04-17 18:28:44 +0300
commit75a650aa6de13eaf1e0e17d5ec7bfffeee0db212 (patch)
treecba9aea6ac260a69276b9b1e6c3c0feb75bbbc26 /src/components/avatar_list
parent8ed4eb8a7ffe0e370cfc06017d2bce34b2c9d987 (diff)
update styles and remove unnecessary stuff
Diffstat (limited to 'src/components/avatar_list')
-rw-r--r--src/components/avatar_list/avatar_list.vue49
1 files changed, 12 insertions, 37 deletions
diff --git a/src/components/avatar_list/avatar_list.vue b/src/components/avatar_list/avatar_list.vue
index 077d002d..fc5abf01 100644
--- a/src/components/avatar_list/avatar_list.vue
+++ b/src/components/avatar_list/avatar_list.vue
@@ -1,7 +1,7 @@
<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" />
+ <ul class="avatars">
+ <li class="avatars-item" v-for="avatar in slicedAvatars">
+ <UserAvatar :src="avatar.profile_image_url" class="avatar-small" />
</li>
</ul>
</template>
@@ -10,53 +10,28 @@
<style lang="scss">
@import '../../_variables.scss';
+
.avatars {
- display: inline-flex; /* Causes LI items to display in row. */
- list-style-type: none;
+ display: flex;
margin: 0;
padding: 0;
+ // For hiding overflowing elements
+ flex-wrap: wrap;
+ height: 24px;
+
li.avatars-item {
- height: 24px;
- width: 24px;
- margin: 0 5px 0 0;
+ margin: 0 0 5px 5px;
&:first-child {
- padding-left: 12px;
+ padding-left: 10px;
}
- &:last-child {
- margin-right: 0;
- }
-
- .avatars-img {
+ .avatar-small {
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;
- }
- }
}
}
}