Fix alignment of user menu avatar (#12289)

* Fix alignment of user menu avatar

https://github.com/matrix-org/matrix-react-sdk/pull/12267 made the avatar
a couple of pixels out of alignment with the space icons. It just needed
to be moved 2px to the right to match the 18px margin of the space icons
(including the padding from the black border).

Also change elements in the user menu to block elements so they don't
generate extra vertical space in the user menu div, which was causing the
hairline to be too far down.

* Update snapshots

* Typo

Co-authored-by: Robin <robin@robin.town>

* Reference the span by class

* The img wasn't actually necessary here

---------

Co-authored-by: Robin <robin@robin.town>
This commit is contained in:
David Baker 2024-02-27 19:50:44 +00:00 committed by GitHub
parent db6f7da2b2
commit 5ac222e1c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -390,8 +390,16 @@ limitations under the License.
.mx_UserMenu { .mx_UserMenu {
padding-bottom: 12px; padding-bottom: 12px;
border-bottom: 1px solid $separator; border-bottom: 1px solid $separator;
margin: 12px 14px 4px 16px; margin: 12px 14px 4px 18px;
width: min-content;
max-width: 226px; max-width: 226px;
/* Display the container and img here as block elements so they don't take
* up extra vertical space.
*/
.mx_UserMenu_userAvatar_BaseAvatar {
display: block;
}
} }
} }