/* AvatarStack */ /* Stacked avatars can be used to show who is participating in thread when ** there is limited space available. */ .AvatarStack { position: relative; min-width: 26px; height: 20px; & .AvatarStack-body { position: absolute; } &.AvatarStack--two { min-width: 36px; } &.AvatarStack--three-plus { min-width: 46px; } } .AvatarStack-body { display: flex; background: var(--color-canvas-default); border-radius: 100px; & .avatar { position: relative; z-index: 2; display: flex; width: 20px; height: 20px; box-sizing: content-box; margin-right: -11px; background-color: var(--color-canvas-default); border-right: var(--borderWidth-thin, 1px) solid var(--color-canvas-default); border-radius: var(--borderRadius-small, 4px); box-shadow: none; transition: margin 0.1s ease-in-out; &:first-child { z-index: 3; } &:last-child { z-index: 1; border-right: 0; } & img { border-radius: var(--borderRadius-small, 4px); } /* Account for 4+ avatars */ &:nth-child(n + 4) { display: none; opacity: 0; } } &:hover { & .avatar { margin-right: 3px; } & .avatar:nth-child(n + 4) { display: flex; opacity: 1; } & .avatar-more { display: none !important; } } } .avatar.avatar-more { z-index: 1; margin-right: 0; background: var(--color-canvas-subtle); &::before, &::after { position: absolute; display: block; height: 20px; content: ''; border-radius: 2px; outline: var(--borderWidth-thin, 1px) solid var(--color-canvas-default); } &::before { width: 17px; background: var(--color-avatar-stack-fade-more); } &::after { width: 14px; background: var(--color-avatar-stack-fade); } } /* Right aligned variation */ .AvatarStack--right { & .AvatarStack-body { right: 0; flex-direction: row-reverse; &:hover .avatar { margin-right: 0; margin-left: 3px; } & .avatar:not(:last-child) { border-left: 0; } } & .avatar.avatar-more { background: var(--color-avatar-stack-fade); &::before { width: 5px; } &::after { width: 2px; background: var(--color-canvas-subtle); } } & .avatar { margin-right: 0; margin-left: -11px; border-right: 0; border-left: var(--borderWidth-thin, 1px) solid var(--color-canvas-default); } }