Moderator should use "object-fit: cover" for profile photos displayed next to questions

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
4 years ago
2 years ago

People

(Reporter: dholbert, Unassigned)

Tracking

Details

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
In the profile images that Moderator displays next to users' questions, their faces may be squashed, if their profile photo is tall & skinny. (since moderator places it in a square <img> element)

"object-fit: cover" will fix this by preserving the image's aspect ratio when scaling it down.

(Note: "cover" ensures that we'll fill the <img> content-box entirely, probably with a little overflow. The overflow will be centered, due to the default value of "object-fit"; I assume a bit of overflow is fine, given that we're already forcing overflow by placing a circular clip-region over the image.)
(Reporter)

Comment 1

4 years ago
"object-fit" support was only just recently added on Nightly, here:
 https://bugzilla.mozilla.org/show_bug.cgi?id=1099450

So it's not available in non-Nightly Firefox versions yet, but it will be when that change rides the trains (and the profile-images will get better-looking, if we've fixed Moderator to take advantage of it).
(Reporter)

Comment 2

4 years ago
Created attachment 8525658 [details]
screenshot of how tall profile images currently render on moderator (squashed vertically)
(Reporter)

Comment 3

4 years ago
Created attachment 8525660 [details]
screenshot with "object-fix: cover" added to the <img> (locally, in devtools)
(Reporter)

Updated

4 years ago
Attachment #8525658 - Attachment description: screenshot of how profile images currently render on moderator → screenshot of how tall profile images currently render on moderator
(Reporter)

Updated

4 years ago
Attachment #8525658 - Attachment description: screenshot of how tall profile images currently render on moderator → screenshot of how tall profile images currently render on moderator (squashed vertically)
(Reporter)

Comment 4

4 years ago
Hmm, as noted in bug 1035475, it sounds like this bugzilla component isn't monitored, and I should perhaps file this at github ( https://github.com/mozilla/mozmoderator/issues/ ) instead.
(Reporter)

Comment 5

4 years ago
Looks like this general issue is tracked at https://github.com/mozilla/mozmoderator/issues/70 -- I added a note there.
(Assignee)

Updated

2 years ago
Product: Participation Infrastructure → Participation Infrastructure Graveyard
Closing due to bug 1325337.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.