Make WordPress Core

Opened 5 years ago

Last modified 6 months ago

#49030 new defect (bug)

Twenty Twenty: video resize functionality also impacts other elements on the page

Reported by: jeherve's profile jeherve Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.3
Component: Bundled Theme Keywords: has-patch needs-testing dev-feedback
Focuses: javascript Cc:

Description

Twenty Twenty bundles a functionality named "Intrinsic Ratio Embeds", allowing videos (iframe, object, video) to be automatically resized on demand.

This is practical, but can be problematic for some elements on the page that may not behave like a video, or that may not be in the post content at all.

While plugins can use the .intrinsic-ignore CSS class to avoid being impacted by this, I wonder if we could be a bit more specific within the theme, and only target videos inside the post content. This would avoid conflicting with plugins adding iFrames and / or videos outside of the post content, like in widgets.

Attachments (1)

49030.diff (609 bytes) - added by jeherve 5 years ago.
Only target videos inside post content

Download all attachments as: .zip

Change History (7)

@jeherve
5 years ago

Only target videos inside post content

#1 @lancewillett
5 years ago

+1 for limiting the scope of this JavaScript script to only look for objects in post content.

#2 @arcio
5 years ago

Please fix this, not all iframes are videos.

#3 @ianbelanger
5 years ago

  • Focuses javascript added
  • Keywords needs-testing dev-feedback added

This functionality was added in the theme before we decided to add this add_theme_support( 'responsive-embeds' );. It may no longer be needed. I am going to test this to see if we can remove the whole Intrinsic Ratio Embeds function. Other testing would be appreciated. Thanks for bringing this up @jeherve.

#4 @aidvu
5 years ago

+1 on limiting the scope of this.

@ianbelanger what more needs to be done here?

Version 0, edited 5 years ago by aidvu (next)

This ticket was mentioned in Slack in #core-themes by karmatosed. View the logs.


6 months ago

#6 @karmatosed
6 months ago

  • Milestone changed from Awaiting Review to Future Release

Moving this to a future release as it has a patch and agreed approach. It now needs testing to check after some time has passed.

Note: See TracTickets for help on using tickets.