Editor inline styles generated by block supports are broken in Query Loop block preview #54956
Closed
Description
Description
When using a Query Loop to display content, all but the currently selected items in the query get rendered using the __experimentalUseBlockPreview
hook.
In WordPress 6.4 Beta 1 this block preview does not get any of the blocks generated inline styles from the style engine applied causing broken layouts in the editor.
The items rendered by the useBlockPreview
hook are missing the generated classnames wp-container-278
Step-by-step reproduction instructions
- Insert a Query Loop Block
- Insert a "Stack" block within the Post Template
- Set the layout of the Stack block to centered
- Change the block gap value of the stack block
- Select a different item in the query loop
- you will see the layout being broken for the non selected items
Screenshots, screen recording, code snippet
CleanShot.2023-10-01.at.17.19.18.mp4
Environment info
- WordPress 6.4 Beta 1
- Twenty Twenty Four Theme
- No Gutenberg Plugin active
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