Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

font-family: "object-fit:cover"; #22546

Closed
bosonno opened this issue Dec 20, 2022 · 6 comments · Fixed by #22693
Closed

font-family: "object-fit:cover"; #22546

bosonno opened this issue Dec 20, 2022 · 6 comments · Fixed by #22693
Labels
bug Something isn't working

Comments

@bosonno
Copy link

bosonno commented Dec 20, 2022

Steps to reproduce the problem

Incorrect font family for alt text when avatar image is missing.

Expected behaviour

Correct font family should have been used.

Actual behaviour

Incorrect font family used.

Detailed description

.account__avatar img {
display: block;
width: 100%;
height: 100%;
-o-object-fit: cover;
font-family: "object-fit:cover";
object-fit: cover;
}

Specifications

Mastodon 4.0.2

@bosonno bosonno added the bug Something isn't working label Dec 20, 2022
@ClearlyClaire
Copy link
Contributor

IIRC this is on purpose to provide the object-fit: cover functionality through a polyfill. That being said, this is likely not needed anymore.

@ClearlyClaire
Copy link
Contributor

It was added in #4182 and support for object-fit is now near-universal: https://caniuse.com/object-fit

So we may want to drop the polyfill.

@bosonno
Copy link
Author

bosonno commented Dec 23, 2022

IIRC there's no font-family named: "object-fit:cover"
https://www.dafont.com/search.php?q=object-fit%3A+cover

@ClearlyClaire
Copy link
Contributor

Of course, it's just used to store the value of the object-fit property somewhere where Edge can read it so that the polyfill can do its work.

@bosonno
Copy link
Author

bosonno commented Dec 23, 2022

IIRC there's no font-family named: "object-fit:cover" https://www.dafont.com/search.php?q=object-fit%3A+cover

yet

@shuuji3
Copy link
Contributor

shuuji3 commented Dec 23, 2022

Thanks @ClearlyClaire, I found the same issue and investigated by myself but couldn't find the cause. That past PR you showed was beneficial! 🙂

I created a PR to revert the old polyfill #22693.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants