Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table Block: Block margin override layout margin #55409

Closed
t-hamano opened this issue Oct 17, 2023 · 3 comments
Closed

Table Block: Block margin override layout margin #55409

t-hamano opened this issue Oct 17, 2023 · 3 comments
Assignees
Labels
[Block] Table Affects the Table Block [Feature] Layout Layout block support, its UI controls, and style output. [Package] Block library /packages/block-library [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

t-hamano commented Oct 17, 2023

Description

The Table block itself has margin: 0 0 1em value. This selector has a higher specificity, so it overrides the margins above the blocks and eliminates the white space between the blocks.

specificity

table

From what I remember, the selector specificity of the layout was reduced. I think this may have brought this issue to the surface. The figure element, which is a wrapper element for the table block, already has a low-specificity style. Therefore, I think the block margin should be removed.

By the way, this style for the Table block exists in theme.css. However, an issue has been reported in #54783 where the Gutenberg plugin's theme.css cannot override the core theme.css. Therefore, it is not possible to debug whether or not removing the block margin has resolved the issue. Regarding this issue, I submitted #54936.

Step-by-step reproduction instructions

  • Insert multiple blocks, including the table block.
  • There should be no margin above the table block.

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 6.4-RC1
  • I also reproduce it with the latest Gutenberg trunk.

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

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Package] Block library /packages/block-library [Block] Table Affects the Table Block [Feature] Layout Layout block support, its UI controls, and style output. labels Oct 17, 2023
@t-hamano t-hamano self-assigned this Oct 17, 2023
@annezazu
Copy link
Contributor

@t-hamano thanks so much for opening all these various issues! Can you please start including GB and WP versions when you do so? We are in the middle of the 6.4 cycle and it's critical we know which issues are relevant for triaging purposes.

@t-hamano
Copy link
Contributor Author

Sorry for causing confusion. In the issue I recently submitted, I added information about whether the problem is occurring with WordPress 6.4RC1 or the latest Gutenberg.

@t-hamano
Copy link
Contributor Author

t-hamano commented Apr 1, 2024

This issue seems to be resolved in the latest Gutenberg. I think the following PRs are probably related.

  • #57699: Margin has been removed from the table block
  • #59457: Margin specificity has been reduced

@t-hamano t-hamano closed this as completed Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Table Affects the Table Block [Feature] Layout Layout block support, its UI controls, and style output. [Package] Block library /packages/block-library [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants