Remove unnecessary empty Template Part wrapper div. #51296
Labels
[Block] Template Part
Affects the Template Parts Block
[Type] Enhancement
A suggestion for improvement.
Description
Let's say comments are in a template part. Even though the comments are turned off from a specific post/page, the
div.wp-block-template-part
is still in the markup. The height is 0 as it's empty, but the trouble is Gutenberg adds the default blockGap to the emptydiv
, which sometimes creates misaligning.For example, the content should be bottom aligned with the "design with WordPress" bit, but it won't because of the empty
div
with the default top margin added.I don't see the necessary to be there, can we stop adding it altogether?
Step-by-step reproduction instructions
div.wp-block-template-part
on the front of the site.Screenshots, screen recording, code snippet
No response
Environment info
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: