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

Statement about applicable object-position and object-fit is wrong (?) #32474

Closed
tpraxl opened this issue Feb 28, 2024 · 1 comment · Fixed by #34529
Closed

Statement about applicable object-position and object-fit is wrong (?) #32474

tpraxl opened this issue Feb 28, 2024 · 1 comment · Fixed by #34529
Labels
Content:HTML Hypertext Markup Language docs help wanted If you know something about this topic, we would love your help!

Comments

@tpraxl
Copy link

tpraxl commented Feb 28, 2024

MDN URL

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe

What specific section or headline is this issue about?

Positioning and scaling

What information was incorrect, unhelpful, or incomplete?

As a replaced element, the position, alignment, and scaling of the embedded document within the <iframe> element's box, can be adjusted with the object-position and object-fit properties.

I tried to apply iframe { object-fit: contain; } with several combinations of explicit width & height, overflow: hidden, even using the deprecated scrolling attribute of the <iframe>. It doesn't seem to work.

So either the rule "replaced element -> can be used with object-fit and object-position" is wrong, because it is only applicable to images and videos, or we should really provide an example.

What did you expect to see?

Either I would have expected not to see this paragraph at all, or I would have expected object-fit and object-position to work.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@tpraxl tpraxl added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Feb 28, 2024
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:HTML Hypertext Markup Language docs and removed Content:CSS Cascading Style Sheets docs Content:HTML Hypertext Markup Language docs labels Feb 28, 2024
@Josh-Cena Josh-Cena added help wanted If you know something about this topic, we would love your help! Content:CSS Cascading Style Sheets docs Content:HTML Hypertext Markup Language docs and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jun 5, 2024
@Josh-Cena Josh-Cena removed the Content:CSS Cascading Style Sheets docs label Jun 17, 2024
@OnkarRuikar
Copy link
Contributor

object-position does work in FIrefox: https://developer.mozilla.org/en-US/play?id=M%2BIuRXx6jXT3WN%2FzFjlc5FQ1p%2B8VB0qGSpBnv%2F4B8bTvJRCQtdgRm9Qi%2BaXMV3jGMLkxAnciNkCPtL9a

1

object-fit doesn't work in any browser. As iframe can't affect content layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTML Hypertext Markup Language docs help wanted If you know something about this topic, we would love your help!
3 participants