From 06ab6982697cedc7c946e07f6a61f01a7a606ded Mon Sep 17 00:00:00 2001 From: ElementRobot Date: Fri, 8 Sep 2023 12:56:59 +0200 Subject: [PATCH] [Backport staging] Fix vertical alignment of default avatar font (#11592) Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- res/css/views/avatars/_BaseAvatar.pcss | 3 ++- res/css/views/right_panel/_UserInfo.pcss | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/res/css/views/avatars/_BaseAvatar.pcss b/res/css/views/avatars/_BaseAvatar.pcss index dd643ebfb5..8545fa128a 100644 --- a/res/css/views/avatars/_BaseAvatar.pcss +++ b/res/css/views/avatars/_BaseAvatar.pcss @@ -24,8 +24,9 @@ limitations under the License. } button.mx_BaseAvatar { - /* The user agent stylesheet overrides the font-size in this scenario + /* The user agent stylesheet overrides the font-size & line-height in this scenario And that breaks the alignment, emojis, and all sorts of things */ font-size: inherit; + line-height: inherit; } diff --git a/res/css/views/right_panel/_UserInfo.pcss b/res/css/views/right_panel/_UserInfo.pcss index c0b8f16c6b..13e64cb903 100644 --- a/res/css/views/right_panel/_UserInfo.pcss +++ b/res/css/views/right_panel/_UserInfo.pcss @@ -99,6 +99,11 @@ limitations under the License. margin: 0 auto; transition: 0.5s; + .mx_BaseAvatar { + /* Override the calculated font-size so that the letter isn't tiny */ + font-size: 4rem; + } + .mx_BaseAvatar, .mx_BaseAvatar img { width: 100%; @@ -250,6 +255,11 @@ limitations under the License. max-width: 72px; margin: 0 auto; } + + .mx_BaseAvatar { + /* Override the calculated font-size so that the letter isn't tiny */ + font-size: 2rem; + } } } }