From 0ee2eac0e592ec3c9a0a0a7abce2939dc00682c1 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 8 Sep 2023 11:01:21 +0100 Subject: [PATCH] Fix vertical alignment of default avatar font (#11582) --- 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; + } } } }