Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Left or right aligned images are the wrong size on the front. #737

@carolinan

Description

@carolinan

Describe the bug
When an image is left or right aligned in the editor, the max width is reduced:

.editor-styles-wrapper .wp-block[data-align="left"] > * {
    max-width: 290px;
    margin-right: var(--global--spacing-horizontal);
}

On the front, the max width of the image is depending on multiple styles, including:

.entry-content img {
    max-width: 100%;
}
.wp-block-image img {
    max-width: 100%;
}

To Reproduce
Steps to reproduce the behavior:

  1. Add two image blocks to the editor. It does not matter if the blocks are the only blocks, or for example placed in between text.
  2. Align the image to the left and right respectively.
  3. View the size in the editor, and save.
  4. View the front and compare the size.
  5. See error

Expected behavior
The editor and front should match.

Screenshots¨
Editor:

image-left-editor

Front:
image-left-front

Editor version (please complete the following information):
WordPress version: 5.6-beta2-49360
Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default?
"default"

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions