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

data-object-fit polyfill/browser support #38457

Open
strarsis opened this issue Feb 2, 2022 · 2 comments
Open

data-object-fit polyfill/browser support #38457

strarsis opened this issue Feb 2, 2022 · 2 comments
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Type] Code Quality Issues or PRs that relate to code quality

Comments

@strarsis
Copy link
Contributor

strarsis commented Feb 2, 2022

Description

I noticed that some blocks as the core/video block use an attribute like data-object-fit.
This indicates that a polyfill should/can be used instead of native CSS object-fit.
object-fit/object-position are now basically supported by all browsers. Does it still make sense to add these data attributes/polyfills?

Step-by-step reproduction instructions

  1. Insert a core/cover block, assign a video to it.
  2. Save the post/page.
  3. Open the post/page in frontend. Inspect the core/cover block associated element and note that it has a data-object-fit attribute (e.g. with value cover) assigned to it.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@annezazu annezazu added [Type] Question Questions about the design or development of the editor. Needs Technical Feedback Needs testing from a developer perspective. labels Feb 22, 2022
@tellthemachines tellthemachines added [Type] Code Quality Issues or PRs that relate to code quality [Block] Cover Affects the Cover Block - used to display content laid over a background image and removed [Type] Question Questions about the design or development of the editor. Needs Technical Feedback Needs testing from a developer perspective. labels Oct 19, 2022
@tellthemachines
Copy link
Contributor

Thanks for reporting this! object-fit-polyfill was removed in #34536, so we should remove those data attributes from the Cover block too.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 20, 2022
@aristath
Copy link
Member

aristath commented Oct 20, 2022

Good catch!
PR in #45138 to clean these up 👍

EDIT: Unfortunately there were some errors in the console and this requires adding a deprecation - which I was unable to get working. If anyone else wants to give this a go, please do, I closed the PR.

@tellthemachines tellthemachines removed the [Status] In Progress Tracking issues with work in progress label Nov 9, 2022
@aristath aristath removed their assignment Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants