Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix consistent avatar output for Percy (#11472)
Browse files Browse the repository at this point in the history
* Fix consistent avatar output for Percy

* Fix last room in list clipped

Fixes element-hq/element-web#26049

* Fix decorated avatar indicator centering

Fixes element-hq/element-web#26052

* Fix uploader centering
  • Loading branch information
Germain authored Aug 25, 2023
1 parent c6d9228 commit 64f762d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions res/css/views/avatars/_BaseAvatar.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ limitations under the License.
/* Stick the default room avatar colour, so it doesn't cause a false diff on the screenshot */
.mx_BaseAvatar {
background-color: var(--percy-color-avatar) !important;
color: white !important;
}
}
9 changes: 4 additions & 5 deletions res/css/views/avatars/_DecoratedRoomAvatar.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
.mx_ExtraTile {
position: relative;
contain: content;
line-height: 1;
line-height: 0;

&.mx_DecoratedRoomAvatar_cutout .mx_BaseAvatar {
mask-image: url("$(res)/img/element-icons/roomlist/decorated-avatar-mask.svg");
Expand All @@ -30,10 +30,9 @@ limitations under the License.
.mx_DecoratedRoomAvatar_icon {
position: absolute;
/* the following percentage based sizings are to match the scalable svg mask for the cutout */
bottom: 0;
right: 0;
transform: translate(-25%, -70%);
width: 25%;
bottom: 6.25%; // 2px for a 32x32 avatar
right: 6.25%;
width: 25%; // 8px for a 32x32 avatar
height: 25%;
border-radius: 50%;
}
Expand Down
2 changes: 2 additions & 0 deletions res/css/views/elements/_MiniAvatarUploader.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ limitations under the License.
border-radius: 50%;
z-index: 1;

line-height: 0;

.mx_MiniAvatarUploader_cameraIcon {
height: 100%;
width: 100%;
Expand Down

0 comments on commit 64f762d

Please sign in to comment.