2019-12-16 22:58:12 +08:00
|
|
|
/*
|
2020-09-22 11:00:51 +08:00
|
|
|
Copyright 2019, 2020 The Matrix.org Foundation C.I.C.
|
2019-12-16 22:58:12 +08:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
.mx_AvatarSetting_avatar {
|
2020-09-22 11:00:51 +08:00
|
|
|
width: 90px;
|
2022-07-27 21:39:29 +08:00
|
|
|
min-width: 90px; /* so it doesn't get crushed by the flexbox in languages with longer words */
|
2020-09-22 11:00:51 +08:00
|
|
|
height: 90px;
|
|
|
|
margin-top: 8px;
|
2019-12-16 22:58:12 +08:00
|
|
|
position: relative;
|
|
|
|
|
2020-09-22 11:00:51 +08:00
|
|
|
.mx_AvatarSetting_hover {
|
2020-09-24 22:23:06 +08:00
|
|
|
transition: opacity $hover-transition;
|
2020-09-22 11:00:51 +08:00
|
|
|
|
2022-07-27 21:39:29 +08:00
|
|
|
/* position to place the hover bg over the entire thing */
|
2020-09-22 11:00:51 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
|
2022-07-27 21:39:29 +08:00
|
|
|
pointer-events: none; /* let the pointer fall through the underlying thing */
|
2020-09-22 11:00:51 +08:00
|
|
|
|
|
|
|
line-height: 90px;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
> span {
|
2022-06-15 02:17:10 +08:00
|
|
|
color: $primary-content;
|
2022-07-27 21:39:29 +08:00
|
|
|
position: relative; /* tricks the layout engine into putting this on top of the bg */
|
2020-09-22 11:00:51 +08:00
|
|
|
font-weight: 500;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_AvatarSetting_hoverBg {
|
2022-07-27 21:39:29 +08:00
|
|
|
/* absolute position to lazily fill the entire container */
|
2020-09-22 11:00:51 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
|
|
|
|
opacity: 0.5;
|
2022-06-15 02:17:10 +08:00
|
|
|
background-color: $quinary-content;
|
2020-09-22 11:00:51 +08:00
|
|
|
border-radius: 90px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.mx_AvatarSetting_avatar_hovering .mx_AvatarSetting_hover {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:not(.mx_AvatarSetting_avatar_hovering) .mx_AvatarSetting_hover {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
2019-12-16 22:58:12 +08:00
|
|
|
& > * {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_AccessibleButton.mx_AccessibleButton_kind_primary {
|
|
|
|
margin-top: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_AccessibleButton.mx_AccessibleButton_kind_link_sm {
|
2020-09-22 11:00:51 +08:00
|
|
|
width: 100%;
|
2019-12-16 22:58:12 +08:00
|
|
|
}
|
|
|
|
|
2019-12-16 23:08:22 +08:00
|
|
|
& > img {
|
|
|
|
cursor: pointer;
|
2019-12-17 00:23:35 +08:00
|
|
|
object-fit: cover;
|
2019-12-16 23:08:22 +08:00
|
|
|
}
|
|
|
|
|
2019-12-16 22:58:12 +08:00
|
|
|
& > img,
|
|
|
|
.mx_AvatarSetting_avatarPlaceholder {
|
|
|
|
display: block;
|
2020-09-22 11:00:51 +08:00
|
|
|
height: 90px;
|
2020-10-14 17:57:34 +08:00
|
|
|
width: inherit;
|
2020-09-22 11:00:51 +08:00
|
|
|
border-radius: 90px;
|
|
|
|
cursor: pointer;
|
2019-12-16 22:58:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_AvatarSetting_avatarPlaceholder::before {
|
2022-06-15 02:17:10 +08:00
|
|
|
background-color: $quinary-content;
|
2019-12-16 22:58:12 +08:00
|
|
|
mask: url("$(res)/img/feather-customised/user.svg");
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
mask-size: 36px;
|
|
|
|
mask-position: center;
|
2022-12-12 19:24:14 +08:00
|
|
|
content: "";
|
2019-12-16 22:58:12 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
}
|
2020-09-22 11:00:51 +08:00
|
|
|
|
|
|
|
.mx_AvatarSetting_uploadButton {
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
border-radius: 32px;
|
2022-06-15 02:17:10 +08:00
|
|
|
background-color: $secondary-content;
|
2020-09-22 11:00:51 +08:00
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_AvatarSetting_uploadButton::before {
|
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: 55%;
|
2022-06-15 02:17:10 +08:00
|
|
|
background-color: $quinary-content;
|
2022-12-12 19:24:14 +08:00
|
|
|
mask-image: url("$(res)/img/feather-customised/edit.svg");
|
2020-09-22 11:00:51 +08:00
|
|
|
}
|
2019-12-16 22:58:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_AvatarSetting_avatar .mx_AvatarSetting_avatarPlaceholder {
|
2021-08-25 17:08:10 +08:00
|
|
|
background-color: $system;
|
2019-12-16 22:58:12 +08:00
|
|
|
}
|