Open luminuu opened 1 month ago
It makes a difference if the post content block is on the top level of the template vs. if the post content block is nested within a group.
I'm able to replicate this as well.
I've narrowed down where this is being triggered, but I'm not sure how/why the code is doing what it is doing.
Description
Based on feedback I got and my own testing, I found that when editing a page in the Post Editor and the template it's using has the Post Content block nested in a group, the content on the Post Editor is not showing in full width, but in a constrainted view. It works all fine in the site editor and the frontend though.
It makes a difference if the post content block is on the top level of the template vs. if the post content block is nested within a group. If the latter is happening, the following code is applied in the post editor:
The 620px is the content size of TT4, where I tested this with. I can reproduce this problem with the Greyd WP theme as well, so it's not happening in the theme but in the editor. In the post editor, it's impossible to assign any of the alignment classes to a top level element.
The reason why the post content block has to be in a group is that this group has to be set to use the main tag, as otherwise the skip link is not going to be generated by WP, as it requires a main tag in the code. For testing, see the Greyd WP theme template "Blank", which has the exact setup that I used this to test with.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
(Video has audio)
https://github.com/user-attachments/assets/48e943ce-1bbb-4c08-a92a-757c48525df4
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.