2021-04-21 16:32:23 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
.module-Avatar {
|
|
|
|
display: inline-flex;
|
|
|
|
line-height: 0;
|
2021-04-27 13:20:17 +00:00
|
|
|
position: relative;
|
2021-04-21 16:32:23 +00:00
|
|
|
user-select: none;
|
|
|
|
vertical-align: middle;
|
|
|
|
|
2021-10-12 19:07:58 +00:00
|
|
|
&__contents {
|
|
|
|
@include avatar-colors;
|
|
|
|
position: relative;
|
|
|
|
overflow: hidden;
|
|
|
|
border-radius: 100%;
|
2021-04-21 16:32:23 +00:00
|
|
|
width: 100%;
|
2021-10-12 19:07:58 +00:00
|
|
|
height: 100%;
|
|
|
|
border: 0;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
outline: none;
|
|
|
|
|
|
|
|
@at-root button#{&} {
|
|
|
|
@include keyboard-mode {
|
|
|
|
&:focus {
|
|
|
|
box-shadow: 0 0 0 3px $color-ultramarine;
|
|
|
|
}
|
2021-04-21 16:32:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-12 19:07:58 +00:00
|
|
|
&__image,
|
|
|
|
&__label,
|
|
|
|
&__icon,
|
|
|
|
&__spinner-container,
|
|
|
|
&__click-to-view {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
2021-04-27 13:20:17 +00:00
|
|
|
&__image {
|
2021-05-10 17:50:04 +00:00
|
|
|
background-position: center center;
|
2021-04-27 13:20:17 +00:00
|
|
|
background-size: cover;
|
|
|
|
transition: filter 100ms ease-out;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__click-to-view {
|
|
|
|
@include font-body-2;
|
|
|
|
align-items: center;
|
|
|
|
background: $color-black-alpha-20;
|
|
|
|
color: $color-white;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
left: 0;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v2/click-outline-24.svg',
|
|
|
|
$color-white
|
|
|
|
);
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
height: 24px;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
width: 24px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background: $color-black-alpha-40;
|
|
|
|
}
|
2021-04-21 16:32:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__label {
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
text-align: center;
|
|
|
|
text-transform: uppercase;
|
|
|
|
transition: font-size 100ms ease-out;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__icon {
|
2021-10-12 19:07:58 +00:00
|
|
|
-webkit-mask-repeat: no-repeat;
|
|
|
|
-webkit-mask-position: center;
|
|
|
|
-webkit-mask-size: 62%;
|
|
|
|
background-color: var(--fg);
|
2021-04-21 16:32:23 +00:00
|
|
|
|
|
|
|
&--direct {
|
2021-10-12 19:07:58 +00:00
|
|
|
-webkit-mask-image: url('../images/icons/v2/profile-outline-20.svg');
|
|
|
|
-webkit-mask-size: 60%;
|
2021-04-21 16:32:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&--group {
|
2021-10-12 19:07:58 +00:00
|
|
|
-webkit-mask-image: url('../images/icons/v2/group-outline-24.svg');
|
2021-04-21 16:32:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&--note-to-self {
|
2021-10-12 19:07:58 +00:00
|
|
|
-webkit-mask-image: url('../images/icons/v2/note-24.svg');
|
2021-04-21 16:32:23 +00:00
|
|
|
}
|
2021-11-12 01:17:29 +00:00
|
|
|
|
|
|
|
&--search-result {
|
|
|
|
-webkit-mask-image: url('../images/icons/v2/search-24.svg');
|
|
|
|
-webkit-mask-size: 50%;
|
|
|
|
}
|
2021-04-21 16:32:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__spinner-container {
|
|
|
|
padding: 4px;
|
|
|
|
}
|
2021-11-02 23:01:13 +00:00
|
|
|
|
|
|
|
&__badge {
|
|
|
|
position: absolute;
|
2021-12-01 23:13:09 +00:00
|
|
|
z-index: $z-index-base;
|
2021-11-09 20:34:47 +00:00
|
|
|
|
|
|
|
// Positioning should be overridden by JavaScript. These are set defensively.
|
|
|
|
bottom: 0;
|
|
|
|
right: 0;
|
2021-11-18 20:01:53 +00:00
|
|
|
|
|
|
|
&--static {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&--button {
|
|
|
|
background-color: transparent;
|
|
|
|
background-position: center center;
|
|
|
|
background-size: contain;
|
|
|
|
border: 0;
|
|
|
|
outline: none;
|
|
|
|
|
|
|
|
@include keyboard-mode {
|
|
|
|
&:focus {
|
|
|
|
outline: 2px solid $color-ultramarine;
|
|
|
|
border-radius: 6px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-11-02 23:01:13 +00:00
|
|
|
}
|
2021-04-21 16:32:23 +00:00
|
|
|
}
|