signal-desktop/stylesheets/components/AvatarPreview.scss

122 lines
2.5 KiB
SCSS
Raw Normal View History

2021-08-06 00:17:05 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2024-11-15 23:09:31 +00:00
@use '../mixins';
@use '../variables';
2021-08-06 00:17:05 +00:00
.AvatarPreview {
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
&__avatar {
2024-11-15 23:09:31 +00:00
@include mixins.button-reset;
& {
align-items: center;
border-radius: 100%;
cursor: auto;
display: flex;
font-size: 32px;
height: 80px;
justify-content: center;
margin-bottom: 16px;
margin-top: 4px;
position: relative;
transition: background-color 100ms ease-out;
user-select: none;
width: 80px;
}
2021-08-06 00:17:05 +00:00
&--loading {
2024-11-15 23:09:31 +00:00
background: variables.$color-black;
2021-08-06 00:17:05 +00:00
}
&--has-image {
background-size: cover;
background-position: center center;
}
2024-11-15 23:09:31 +00:00
@include mixins.keyboard-mode {
&:focus {
2024-11-15 23:09:31 +00:00
box-shadow: 0 0 0 3px variables.$color-ultramarine;
}
}
2021-08-06 00:17:05 +00:00
}
&__group {
2023-05-04 18:04:22 +00:00
-webkit-mask: url('../images/icons/v3/group/group.svg') no-repeat center;
2021-08-06 00:17:05 +00:00
-webkit-mask-size: 70%;
height: 100%;
width: 100%;
}
&__note_to_self {
-webkit-mask: url('../images/icons/v3/note/note.svg') no-repeat center;
-webkit-mask-size: 70%;
height: 100%;
width: 100%;
}
2021-08-06 00:17:05 +00:00
&__upload {
align-items: center;
2024-11-15 23:09:31 +00:00
background: variables.$color-gray-02;
2021-08-06 00:17:05 +00:00
border-radius: 100%;
bottom: 4px;
2024-07-24 00:31:40 +00:00
box-shadow:
0px 4px 16px rgba(0, 0, 0, 0.12),
0px 2px 4px rgba(0, 0, 0, 0.2);
2021-08-06 00:17:05 +00:00
display: flex;
height: 28px;
justify-content: center;
position: absolute;
2023-04-20 17:03:43 +00:00
inset-inline-end: -7px;
2021-08-06 00:17:05 +00:00
width: 28px;
&::after {
2024-11-15 23:09:31 +00:00
@include mixins.color-svg(
'../images/icons/v3/camera/camera.svg',
variables.$color-black
);
& {
content: '';
display: block;
height: 16px;
width: 16px;
}
2021-08-06 00:17:05 +00:00
}
}
&__clear {
2024-11-15 23:09:31 +00:00
@include mixins.button-reset;
& {
align-items: center;
background-color: variables.$color-white;
border-radius: 100%;
box-shadow:
0px 4px 16px rgba(0, 0, 0, 0.12),
0px 2px 4px rgba(0, 0, 0, 0.2);
display: flex;
height: 24px;
justify-content: center;
position: absolute;
inset-inline-end: 0;
top: 0;
width: 24px;
}
2021-08-06 00:17:05 +00:00
&:after {
2024-11-15 23:09:31 +00:00
@include mixins.color-svg(
'../images/icons/v3/x/x-compact.svg',
variables.$color-gray-75
);
& {
content: '';
height: 16px;
width: 16px;
}
2021-08-06 00:17:05 +00:00
}
}
}