Skip to content

Full width iframes have layout=intrinsic by default #3506

@schlessera

Description

@schlessera

Bug Description

When an iframe is set to be "full width" in the block editor, it is currently broken because its layout attribute defaults to 'intrinsic'.

Expected Behaviour

An iframe that is set to be "full width" in the block editor should have 'responsive' as its layout attribute.

Steps to reproduce

  1. In the block editor, add an embed block and copy in the URL https://wordpress.tv/2019/10/08/the-history-of-wordpress-in-four-minutes/.
  2. Set the alignment to "Full width".
  3. Publish the post and visit it on its AMP URL.
  4. The embedded video will not be full-width, but rather aligned to the left. Its markup shows that the it is set to layout=intrinsic.

Screenshots

Choosing the "Full width" alignment:
Image 2019-10-15 at 12 03 45 PM

Comparison:
Image 2019-10-15 at 12 05 14 PM

AMP markup:
Image 2019-10-15 at 12 05 42 PM


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • Iframe should look same in AMP as non-AMP

Implementation brief

QA testing instructions

  • See instructions above.

Demo

  • See screenshots.

Changelog entry

  • Set iframe layout to responsive if the embed is aligned to full width.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions