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
When you set a margin on the table block in theme.json, the margin is applied to the table element inside of the figure element. If you include a table caption, the figcaption is included after the table element, which means that the bottom margin applied to the block will be added between the table and the figcaption, instead of beneath the block as a whole.
If you apply a custom vertical margin to the table block inside of the editor, that margin is added to the figure element. That means that you can't overwrite the theme.json table margin on a specific table block.
Step-by-step reproduction instructions
Create a new post.
Insert a table block, and give it a figcaption.
Note the theme.json bottom margin for the core/table block being applied on the table element, pushing down the caption.
Add a vertical margin to the table block inside of the editor. It will be applied to the figure element, which means that the table block now has a vertical margin on the table element, set in theme.json, and a vertical margin set on the figure element, set with the custom margins in the editor.
Screenshots, screen recording, code snippet
Block markup for a table block with 128px in custom vertical margin.
Screenshot of a table block given 128px vertical margin in theme.json (table element), and 128px custom vertical margin on this specific table block (figure element).
Environment info
WordPress 6.7.1
With and without Gutenberg 19.9.0 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
Please confirm which theme type you used for testing.
Block
Classic
Hybrid (e.g. classic with theme.json)
Not sure
The text was updated successfully, but these errors were encountered:
Description
When you set a margin on the table block in theme.json, the margin is applied to the table element inside of the figure element. If you include a table caption, the figcaption is included after the table element, which means that the bottom margin applied to the block will be added between the table and the figcaption, instead of beneath the block as a whole.
If you apply a custom vertical margin to the table block inside of the editor, that margin is added to the figure element. That means that you can't overwrite the theme.json table margin on a specific table block.
Step-by-step reproduction instructions
core/table
block being applied on the table element, pushing down the caption.Screenshots, screen recording, code snippet
Block markup for a table block with 128px in custom vertical margin.
Screenshot of a table block given 128px vertical margin in theme.json (table element), and 128px custom vertical margin on this specific table block (figure element).
Environment info
WordPress 6.7.1
With and without Gutenberg 19.9.0 active
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: