Stewart: no spacing between text and right-aligned Youtube embed #62555
Labels
[Feature Group] Appearance & Themes
Features related to the appearance of sites.
[Pri] Low
Address when resources are available.
[Type] Bug
Quick summary
When right-aligning a Youtube embed, text that wraps around it is completely against the video, making it appear as if the video is obscuring some of the text.
Steps to reproduce
What you expected to happen
For there to be some space between the text content and the video. For example:
What actually happened
There's no space at all between the text and the video:
Context
Reported in the WordPress.org forums at https://wordpress.org/support/topic/youtube-block-overlaps-text/
This appears to be caused by inline CSS targeting a class that's being added dynamically:
If I toggle off that
margin-left
declaration, there's an appropriate margin between the text and the video.I'm able to replicate this on a self-hosted site and an Atomic site, but not a simple site. On a simple site, even though that same inline CSS is there, it's a bit different:
So it appears we're doing something on WordPress.com to prevent this issue that's not happening on non-wpcom sites.
I can also replicate the issue on Twenty Twenty-Two, so this doesn't appear to be theme-specific, but reporting it anyway in case there's anything we can do from our end to compensate, at least for our own themes that are affected by this issue:
Searching the Gutenberg repo I found WordPress/gutenberg#39339 which might also help to address this.
Simple, Atomic or both?
Atomic
Theme-specific issue?
It appears to be a Gutenberg issue rather than a theme issue, but from all our block theme I checked only Stewart seems to be affected.
Browser, operating system and other notes
No response
Reproducibility
Consistent
Severity
No response
Available workarounds?
No but the platform is still usable
Workaround details
Because the inline CSS that's being generated uses
!important
there's no way to override it. It also doesn't appear to work to add custom CSS to change padding or margins on the wrapping paragraph blocks either.The text was updated successfully, but these errors were encountered: