Skip to content

Can't style embedded videos properly due to inline width & height #8383

@maddisondesigns

Description

@maddisondesigns

Describe the bug
There's numerous issues open that discuss the inability to style various blocks so I'm not going to repeat all that again here. The only thing I will say is that we need the ability to specify the content width, and Wide width, at the very minimum.

When you insert a YouTube or Vimeo embed Block, it adds inline width and height to the iframe:

screenshot_763

This causes the content to end up looking something like this (when you have Wide and Full videos):

gutenberg_videoembeds

Whilst its possible to override the width settings by doing something like .wp-block-embed.is-type-video iframe {width: 100%;}, this just makes it look even worse as we can't control the height and the vid just ends up looking squished.

There needs to be a better way to style these video embeds on the front-end.

To Reproduce
Steps to reproduce the behavior:

  1. Add YouTube or Vimeo Embed
  2. View inline iframe styles on front-end

Desktop (please complete the following information):

  • macOS 10.12.6
  • Firefox Quantum 61.0.1 (64-bit)
  • Gutenberg 3.4.0

Some related issues:
#5650
#6131

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions