Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#49600 new defect (bug)

Twenty Twenty: Resized images are centered inside the editor (with no alignment set) since WordPress 5.4

Reported by: dianeco Owned by:
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.3.2
Component: Bundled Theme Keywords: has-patch needs-testing good-first-bug
Focuses: css Cc:


Until WordPress 5.3.2, resized images were left-aligned in the editor when no alignment was set. In WP 5.4 (tested with RC1), resized images in the editor are centered while they are correctly left-aligned on the front-end. The following lines in editor-style-block.css are causing this issue: https://github.com/WordPress/WordPress/blob/master/wp-content/themes/twentytwenty/assets/css/editor-style-block.css#L1063-L1065

.editor-styles-wrapper .wp-block-image.is-resized {
	margin-left: auto;
	margin-right: auto;

I'm not sure what these lines are for. With WP 5.3, they were overridden by WordPress core, which is why it was working.

Attachments (1)

49600.diff (974 bytes) - added by ianbelanger 3 weeks ago.
Removes left and right margin: auto; to fix alignment in the editor.

Download all attachments as: .zip

Change History (3)

#1 @ianbelanger
3 weeks ago

  • Keywords needs-patch added
  • Version changed from trunk to 5.3.2

3 weeks ago

Removes left and right margin: auto; to fix alignment in the editor.

#2 @ianbelanger
3 weeks ago

  • Keywords has-patch needs-testing good-first-bug added; needs-patch removed
  • Milestone changed from Awaiting Review to 5.5
Note: See TracTickets for help on using tickets.