You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v8.0.0-RC1: Image block sits outside of perceived conatiner in editor (Twenty Twenty theme) #21961
Describe the bug
In v8.0.0-RC1 and the Twenty Twenty theme enabled, within the editor the image block sits outside of the central 'container' of the page.
This issue is related to #21885 and #21911 (but this issue is about when no alignment is set).
It looks like this is to do with the change in #21822 where the wrapper div was removed from the Image block in the editor. This change means that the following styling in the Twenty Twenty theme now overrides the margins that should centre the block:
.editor-styles-wrapperfigure{margin:0;}
Whereas if you disable the plugin, then the wrapper div element is targeted by
This particular selector was removed in #20951 at this line. A solution to this issue could be either to fix this in Twenty Twenty, or add back in the div wrapper to the Image block to mitigate the specificity issue.
To reproduce
Steps to reproduce the behavior:
Activate the Twenty Twenty theme on your site
Add an Image block and select any image and set it to left aligned
Instead of the image block being centered within the perceived container of the page, the image is left aligned outside of that 'container'.
Expected behavior
The image block to sit within the perceived 'container' of the page in Twenty Twenty as it does on the front end.
Screenshots
Before (WordPress 5.4, plugin disabled)
After (WordPress 5.4, plugin v8.0.0-RC1 enabled)
Editor version (please complete the following information):
WordPress version: 5.4, Gutenberg v8.0.0-RC1
Desktop (please complete the following information):
Activity
andrewserong commentedon Apr 29, 2020
CC @aduth — I'm not sure if this is a blocking issue, but thought I'd mention it since you released RC 1 🙂
aduth commentedon Apr 29, 2020
@youknowriad As author of #21822 and #20951, do you have any thoughts on what might need to change here?
aduth commentedon Apr 29, 2020
Possibly related fix: #21971
oandregal commentedon Apr 29, 2020
Tested and can confirm that #21971 fixes this as well.
andrewserong commentedon Apr 30, 2020
Thank you for the quick fix on this one and getting it in for v8.0.0! 🎉