2018-04-12 02:23:35 +03:00
|
|
|
/*
|
|
|
|
Copyright 2015, 2016 OpenMarket Ltd
|
|
|
|
|
|
|
|
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_BaseAvatar {
|
|
|
|
position: relative;
|
2022-07-27 16:39:29 +03:00
|
|
|
/* In at least Firefox, the case of relative positioned inline elements */
|
|
|
|
/* (such as mx_BaseAvatar) with absolute positioned children (such as */
|
|
|
|
/* mx_BaseAvatar_initial) is a dark corner full of spider webs. It will give */
|
|
|
|
/* different results during full reflow of the page vs. incremental reflow */
|
|
|
|
/* of small portions. While that's surely a browser bug, we can avoid it by */
|
|
|
|
/* using `inline-block` instead of the default `inline`. */
|
|
|
|
/* https://github.com/vector-im/element-web/issues/5594 */
|
|
|
|
/* https://bugzilla.mozilla.org/show_bug.cgi?id=1535053 */
|
|
|
|
/* https://bugzilla.mozilla.org/show_bug.cgi?id=255139 */
|
2019-03-14 20:50:03 +03:00
|
|
|
display: inline-block;
|
2019-04-22 00:18:06 +03:00
|
|
|
user-select: none;
|
2021-12-01 13:50:06 +03:00
|
|
|
|
|
|
|
&.mx_RoomAvatar_isSpaceRoom {
|
2022-12-12 14:24:14 +03:00
|
|
|
&.mx_BaseAvatar_image,
|
|
|
|
.mx_BaseAvatar_image {
|
2021-12-01 13:50:06 +03:00
|
|
|
border-radius: 8px;
|
|
|
|
}
|
|
|
|
}
|
2018-04-12 02:23:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_BaseAvatar_initial {
|
|
|
|
position: absolute;
|
2021-12-01 13:50:06 +03:00
|
|
|
left: 0;
|
2018-04-12 02:23:35 +03:00
|
|
|
color: $avatar-initial-color;
|
|
|
|
text-align: center;
|
|
|
|
speak: none;
|
|
|
|
pointer-events: none;
|
|
|
|
font-weight: normal;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_BaseAvatar_image {
|
2019-12-19 15:27:25 +03:00
|
|
|
object-fit: cover;
|
2022-05-11 20:06:13 +03:00
|
|
|
aspect-ratio: 1;
|
2020-11-12 21:09:56 +03:00
|
|
|
border-radius: 125px;
|
2018-04-12 02:23:35 +03:00
|
|
|
vertical-align: top;
|
2021-11-08 14:50:53 +03:00
|
|
|
background-color: $background;
|
2018-04-12 02:23:35 +03:00
|
|
|
}
|
2022-06-13 21:25:39 +03:00
|
|
|
|
2022-07-27 16:39:29 +03:00
|
|
|
/* Percy screenshot test specific CSS */
|
2022-06-13 21:25:39 +03:00
|
|
|
@media only percy {
|
2022-07-27 16:39:29 +03:00
|
|
|
/* Stick the default room avatar colour, so it doesn't cause a false diff on the screenshot */
|
2022-07-26 18:39:17 +03:00
|
|
|
.mx_BaseAvatar_initial {
|
2022-06-13 21:25:39 +03:00
|
|
|
background-color: $username-variant2-color !important;
|
2022-07-26 18:39:17 +03:00
|
|
|
border-radius: 125px;
|
|
|
|
}
|
|
|
|
.mx_RoomAvatar_isSpaceRoom .mx_BaseAvatar_initial {
|
|
|
|
border-radius: 8px;
|
|
|
|
}
|
|
|
|
.mx_BaseAvatar_initial + .mx_BaseAvatar_image {
|
|
|
|
visibility: hidden;
|
2022-06-13 21:25:39 +03:00
|
|
|
}
|
|
|
|
}
|