Open OnkarRuikar opened 4 months ago
https://github.com/mdn/browser-compat-data/pull/23631 purports to resolve this, but it does so in an unclear way for object-position
and it does not resolve the issue for object-fit
. It has also produced a problem for web-features, to compute an unambiguous support status for object-position
. cc: @queengooborg @caugner.
And now there's a conflicting story:
object-position
applies to replaced elements.css.properties.object-position
says that object-position
working with only <img>
is a partial implementation.css.properties.object-position.applies_to_iframe_elements
says that object-position
not working with <iframe>
is not a partial implementation for css.properties.object-position
.Taken together, this suggests there's some set of replaced elements that are required and some that are optional. Nowhere does BCD say which are optional and which are required. The only thing I'm certain of is that object-position
works with <img>
elements across browsers and not with <iframe>
elements.
I'd prefer to see one of the following things happen:
css.properties.object-position
enumerating compatibility for all the replaced elements (e.g., create css.properties.object-position.{embed,iframe,img,…}
). Set css.properties.object-position
support to the earliest supported element whatever it happens to be (probably <img>
).css.properties.object-position
to partial_implementation: true
for all the browsers that don't support object-position
with iframes. In other words, treat it like Edge was treated previously and use notes and partial implementation to show that not all replaced elements can be positioned with object-position
.Whatever happens, I'd like to see symmetrical changes to object-fit
, which has similar limitations reported in a different way, so that they can make sense together. It would also alleviate the need for MDN to have several admonitions regarding which elements are and are not supported for object-fit
.
See also https://github.com/web-platform-dx/web-features/pull/1972/.
Add subfeatures to css.properties.object-position enumerating compatibility for all the replaced elements (e.g., create css.properties.object-position.{embed,iframe,img,…}). Set css.properties.object-position support to the earliest supported element whatever it happens to be (probably ).
+1 to the first approach. Detailed info would be more helpful than saying partially implemennted.
For tracking down support, WPT has some test cases- https://wpt.fyi/results/css/css-images?label=master&label=stable&aligned&q=object-position. These are tests for canvas, embed, image, object, and video.
Regrettably, it looks like many of the tests are false negatives for Chrome due to image fuzziness, so it will need manual testing as well.
What type of issue is this?
Missing compatibility data
What information was incorrect, unhelpful, or incomplete?
Related to https://github.com/mdn/content/issues/32474#issuecomment-2182407633
The property doesn't work on iframes in Chromium-based browsers and Safari. But it does work in Firefox. In the OWD weekly meeting, it was decided that BCD needs to cover the iframe entry for the
object-position
property.What browsers does this problem apply to, if applicable?
Chromium (Chrome, Edge 79+, Opera, Samsung Internet), Safari
What did you expect to see?
In the
object-fit
BCD entry, showiframe
is supported in Firefox and not in other browsers. Or in theiframe
BCD entry, showobject-fit
is supported only in Firefox.Did you test this? If so, how?
Run the following playground demo in various browsers. https://developer.mozilla.org/en-US/play?id=M%2BIuRXx6jXT3WN%2FzFjlc5FQ1p%2B8VB0qGSpBnv%2F4B8bTvJRCQtdgRm9Qi%2BaXMV3jGMLkxAnciNkCPtL9a
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
No response
Do you have anything more you want to share?
No response
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/object-position
MDN metadata
MDN page report details
* Query: `css.properties.object-position` * Report started: 2024-07-01T06:25:22.629Z