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

Fix initial letter avatar vertical offset in Firefox #2792

Merged
merged 1 commit into from
Mar 15, 2019

Conversation

jryans
Copy link
Collaborator

@jryans jryans commented Mar 14, 2019

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.

Fixes element-hq/element-web#5594
Might help with element-hq/element-web#9088

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1535053 and
https://bugzilla.mozilla.org/show_bug.cgi?id=255139 for more details on browser
behavior in this case.

I used https://avatars-styling.glitch.me/ as a reduced test case for this bug.

Before:

2019-03-14 at 18 27

After:

2019-03-14 at 18 28

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`.

Fixes element-hq/element-web#5594
Might help with element-hq/element-web#9088

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1535053 and
https://bugzilla.mozilla.org/show_bug.cgi?id=255139 for more details on browser
behavior in this case.
@jryans jryans requested a review from a team March 14, 2019 18:29
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the detailed explanation on the problem. Hopefully it'll also fix the chrome weirdness that has been elusive so far.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants