-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image block: Resized image with no defined alignment appears centered in the editor instead of left-aligned (WP 5.5 beta2) #23986
Comments
I can reproduce this on version 5.5-beta2-48491 with the default editor styles applied. |
Replicated with Gutenberg 8.6.1 & WordPress 5.5 RC. |
@tellthemachines @annezazu The resized image should be centered in the output/FE, correct? (not left-aligned in the editor). |
Right now, seems like the solution is either:
Not quite sure what's intended here! Might need to bring in some designers. |
My understanding of the issue (which I was also able to reproduce) is that an image with no set alignment (defaulting to left-aligned) shouldn't change alignment when resized (it should stay left, in editor and front-end). Instead, what happens is the image suddenly appears center-aligned after resizing. |
I think it's center by default (looking at the icon)? |
That's the bug! It should be left-aligned by default after resizing. That's how it worked before 5.5. |
Checked on 5.4, now I get it. |
I've put together a fix - #26376. Did some debugging, it isn't related to the alignment options. All the blocks that have alignments have that align center icon by default, but it doesn't mean that the actual alignment is center. Table and cover are other examples. This is more of a CSS issue. The image block's wrapping At the same time all blocks have a gutenberg/packages/block-editor/src/components/block-list/style.scss Lines 305 to 309 in 55bf7ec
|
Steps to reproduce
Tested using WordPress 5.5 beta 2 and WP 5.4.2 + Gutenberg 8.5.1.
Tried with Twenty Twenty & Twenty Seventeen.
The text was updated successfully, but these errors were encountered: