Skip to content

Media & Text: Layout breaks when inside a Stack and set to "Crop image to fill" #65605

@andersnoren

Description

@andersnoren

Description

If you place a Media & Text block inside a Stack block, assign an image and set the image to "Crop image to fill", the image will overflow the bounds of the wrapping blocks.

Step-by-step reproduction instructions

  1. Create a new page.
  2. Insert a Stack.
  3. Insert a Media & Text block inside the stack, and assign an image.
  4. In the block settings, set the image to "Crop image to fill".
  5. The image should overflow the stack in the block editor.
  6. Publish and visit the page, and the image should overflow the stack (and the Post Content block) on the front-end as well.

Screenshots, screen recording, code snippet

image

Edit: Disregard the page title – there's no Cover block used in the layout.

Environment info

WP 6.6.2
Twenty Twenty-Four
With or without Gutenberg 19.2.0 active

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Browser IssuesIssues or PRs that are related to browser specific problems[Block] Media & TextAffects the Media & Text Block[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions