Skip to content
New issue

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

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

Already on GitHub? # to your account

Add object-fit and object-position #1831

Merged
merged 6 commits into from
Oct 9, 2024

Conversation

jamesnw
Copy link
Collaborator

@jamesnw jamesnw commented Sep 24, 2024

They both use caniuse: object-fit, but I'm not sure if multiple features can share a feature key.

Also adds missing object-view-box key.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Sep 24, 2024
Copy link
Collaborator

@autonome autonome left a comment

Choose a reason for hiding this comment

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

Yes, seems not right to have >1 Caniuse mapping, I posted to the channel for broader discussion and input.

The only other comment I have is around the replaced element terminology, which seems more on the spec language end of the spectrum than developer/designer POV (esp new learners). If you're using that everywhere already, then maybe not an issue (or a broader one), but doesn't block merging this either way.

@ddbeck
Copy link
Collaborator

ddbeck commented Oct 9, 2024

On the caniuse question @autonome highlighted:

Narrowly, caniuse mappings should be one-to-one or one-or-many. As far as I know, we have no features yet that are many-to-one. It would be unhelpful to show multiple statuses for a single caniuse feature, so I think many-to-one also doesn't make sense. I think we ought to pick one of these to have the caniuse mapping and drop it from the other.

In the future, when we have feature composition nailed down, a feature combining object-fit and object-position is a natural follow on and a place to move the caniuse mapping. Honestly, I see why this is is a single feature on caniuse. Imagine if there was an object shorthand property; this would be easy to put down as a single feature.

Long-term, I'd like it if web-features could take any reasonable address/identifier (e.g., caniuse's object-fit) and resolve a feature (if we have one) or an anonymous slice of a feature (if we don't).

@@ -0,0 +1,11 @@
name: object-fit
description: The `object-fit` CSS property sets how images, videos, and other replaced elements are scaled within their container.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I endorse "replaced element" here—you've already said what it is through examples, so we're doing a little developer education while we're at it.

features/object-position.yml Outdated Show resolved Hide resolved
features/object-position.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

Cheers!

@ddbeck ddbeck merged commit a841329 into web-platform-dx:main Oct 9, 2024
3 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants