2017-05-11 07:56:23 +03:00
|
|
|
// Stacked avatars can be used to show who is participating in thread when
|
|
|
|
// there is limited space available.
|
|
|
|
//
|
|
|
|
// No styleguide references
|
|
|
|
.avatar-stack {
|
|
|
|
display: inline-block;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
position: relative;
|
|
|
|
z-index: 2;
|
|
|
|
display: inline-block;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
box-sizing: content-box;
|
|
|
|
margin-right: -15px;
|
|
|
|
background-color: $bg-white;
|
|
|
|
border-right: 1px solid $white;
|
|
|
|
border-radius: 2px;
|
|
|
|
transition: margin 0.1s ease-in-out;
|
|
|
|
|
|
|
|
&:only-child {
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
z-index: 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
z-index: 1;
|
|
|
|
margin-right: 0;
|
|
|
|
border-right: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// When more than one avatar, margin-left will animate from -15 to 2, and reveal the stack
|
|
|
|
&:hover .avatar {
|
|
|
|
margin-right: 3px;
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-10-27 23:07:17 +03:00
|
|
|
|
|
|
|
// Refactored, new avatar stack:
|
|
|
|
|
2017-10-27 23:19:28 +03:00
|
|
|
.AvatarStack {
|
2017-11-01 01:33:35 +03:00
|
|
|
position: relative;
|
|
|
|
min-width: 26px;
|
|
|
|
height: 20px;
|
2017-11-03 00:34:24 +03:00
|
|
|
font-size: 0;
|
2017-11-01 16:36:54 +03:00
|
|
|
|
|
|
|
&.AvatarStack--2 {
|
|
|
|
min-width: 36px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.AvatarStack--3 {
|
|
|
|
min-width: 46px;
|
|
|
|
}
|
2017-11-01 01:33:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.AvatarStack-body {
|
2017-11-01 02:14:36 +03:00
|
|
|
position: absolute;
|
2017-11-03 01:30:15 +03:00
|
|
|
padding-right: 2px;
|
2017-11-01 07:11:08 +03:00
|
|
|
background: $bg-white;
|
2017-10-27 23:07:17 +03:00
|
|
|
|
|
|
|
.avatar {
|
|
|
|
position: relative;
|
|
|
|
z-index: 2;
|
|
|
|
display: inline-block;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
box-sizing: content-box;
|
2017-11-03 00:34:15 +03:00
|
|
|
margin-right: -11px;
|
2017-10-27 23:07:17 +03:00
|
|
|
background-color: $bg-white;
|
|
|
|
border-right: $border-width $border-style $white;
|
|
|
|
border-radius: 2px;
|
|
|
|
transition: margin 0.1s ease-in-out;
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
z-index: 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
z-index: 1;
|
|
|
|
margin-right: 0;
|
|
|
|
border-right: 0;
|
|
|
|
}
|
|
|
|
|
2017-10-27 23:45:24 +03:00
|
|
|
// stylelint-disable selector-max-type
|
2017-10-27 23:07:17 +03:00
|
|
|
img {
|
|
|
|
border-radius: 2px;
|
|
|
|
}
|
2017-10-27 23:45:24 +03:00
|
|
|
// stylelint-enable selector-max-type
|
2017-10-27 23:07:17 +03:00
|
|
|
|
|
|
|
// Account for 4+ avatars
|
|
|
|
&:nth-child(n+4) {
|
|
|
|
display: none;
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-02 23:55:33 +03:00
|
|
|
&:hover {
|
|
|
|
.avatar:nth-child(n+4) {
|
|
|
|
display: inline-block;
|
|
|
|
opacity: 1;
|
|
|
|
}
|
2017-10-27 23:07:17 +03:00
|
|
|
|
2017-11-02 23:55:33 +03:00
|
|
|
.avatar {
|
2017-11-03 00:34:15 +03:00
|
|
|
margin-right: 3px;
|
2017-11-02 23:55:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-more {
|
|
|
|
display: none !important;
|
|
|
|
}
|
2017-10-27 23:07:17 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar.avatar-more {
|
2017-10-28 00:41:35 +03:00
|
|
|
z-index: 1;
|
2017-10-27 23:07:17 +03:00
|
|
|
margin-right: 0;
|
|
|
|
background: $gray-100;
|
|
|
|
|
2017-11-01 01:27:36 +03:00
|
|
|
&::before,
|
2017-10-27 23:07:17 +03:00
|
|
|
&::after {
|
2017-11-01 01:27:36 +03:00
|
|
|
position: absolute;
|
2017-10-27 23:07:17 +03:00
|
|
|
display: block;
|
|
|
|
height: 20px;
|
|
|
|
content: "";
|
|
|
|
border-radius: 2px;
|
|
|
|
outline: $border-width $border-style $white;
|
|
|
|
}
|
2017-11-01 01:27:36 +03:00
|
|
|
|
|
|
|
&::before {
|
|
|
|
z-index: 2;
|
|
|
|
width: 14px;
|
|
|
|
background: $gray-300;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
width: 17px;
|
|
|
|
background: $gray-200;
|
|
|
|
}
|
2017-10-27 23:07:17 +03:00
|
|
|
}
|
|
|
|
|
2017-11-02 22:27:31 +03:00
|
|
|
// Right aligned variation
|
|
|
|
|
|
|
|
.AvatarStack--right {
|
|
|
|
.AvatarStack-body {
|
|
|
|
right: 0;
|
2017-11-02 23:55:33 +03:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row-reverse;
|
2017-11-03 01:30:15 +03:00
|
|
|
padding-right: 0;
|
|
|
|
padding-left: 2px;
|
2017-11-02 23:55:33 +03:00
|
|
|
|
2017-11-03 00:46:31 +03:00
|
|
|
// stylelint-disable selector-max-specificity
|
2017-11-02 23:55:33 +03:00
|
|
|
&:hover .avatar:nth-child(n+4) {
|
|
|
|
display: inline-block;
|
|
|
|
opacity: 1;
|
|
|
|
}
|
2017-11-03 00:46:31 +03:00
|
|
|
// stylelint-enable selector-max-specificity
|
2017-11-02 23:55:33 +03:00
|
|
|
|
|
|
|
&:hover .avatar {
|
2017-11-03 00:34:15 +03:00
|
|
|
margin-right: 0;
|
|
|
|
margin-left: 3px;
|
2017-11-02 23:55:33 +03:00
|
|
|
}
|
2017-11-02 22:27:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.avatar.avatar-more {
|
|
|
|
background: $gray-300;
|
|
|
|
|
|
|
|
&::before {
|
2017-11-02 23:55:33 +03:00
|
|
|
width: 2px;
|
2017-11-03 00:46:31 +03:00
|
|
|
background: $gray-100;
|
2017-11-02 22:27:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
2017-11-03 00:34:15 +03:00
|
|
|
width: 5px;
|
2017-11-03 00:46:31 +03:00
|
|
|
background: $gray-200;
|
2017-11-02 22:27:31 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
margin-right: 0;
|
2017-11-03 00:34:15 +03:00
|
|
|
margin-left: -11px;
|
2017-11-02 22:27:31 +03:00
|
|
|
border-right: 0;
|
|
|
|
border-left: $border-width $border-style $white;
|
|
|
|
|
|
|
|
&:last-child {
|
2017-11-02 23:55:33 +03:00
|
|
|
margin-right: 0;
|
2017-11-02 22:27:31 +03:00
|
|
|
margin-left: 0;
|
2017-11-02 23:55:33 +03:00
|
|
|
border-left: 0;
|
2017-11-02 22:27:31 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|