Table block: Bottom margin pushes the caption down #68217
Labels
[Block] Table
Affects the Table Block
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
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: