Centered images broken inside innerBlocks for WordPress 6.2 #49542
Labels
[Block] Image
Affects the Image Block
[Block] Media & Text
Affects the Media & Text Block
[Feature] Nested / Inner Blocks
Anything related to the experience of nested/inner blocks inside a larger container, like Group or P
[Type] Bug
An existing feature does not function as intended
Description
For any custom block that uses innerBlocks, when you center an image inside the innerBlocks, it does not appear centered, either in the editor or on the front-end.
Step-by-step reproduction instructions
Install a default theme, e.g. Twenty Twenty-Two.
Add any custom block that uses innerBlocks - for example, the first one here: https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/
Insert the block, then insert an image inside, and attempt to center it. It won't be centered in the editor, nor if you view the result on the front-end.
From an initial inspection, it looks like the CSS for centered images has changed to only center images within is-layout-flow, or something along those lines, which doesn't exist for other blocks.
Screenshots, screen recording, code snippet
No response
Environment info
WordPress 6.2, no Gutenberg plugin
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
The text was updated successfully, but these errors were encountered: