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: Margin/padding support #34652

Closed
scruffian opened this issue Sep 8, 2021 · 4 comments
Closed

Table block: Margin/padding support #34652

scruffian opened this issue Sep 8, 2021 · 4 comments
Labels
[Block] Table Affects the Table Block [Feature] Blocks Overall functionality of blocks

Comments

@scruffian
Copy link
Contributor

What problem does this address?

Themes need a way to customize the margins and paddings of the table block.

What is your proposed solution?

We should add support for margin and padding so that they can be modified by theme.json

@scruffian scruffian added [Feature] Blocks Overall functionality of blocks [Block] Table Affects the Table Block labels Sep 8, 2021
@draganescu
Copy link
Contributor

Adding

"spacing": {
			"margin": true,
			"padding": true
		},

to block.json results in margin and padding being applied to the figure tag of the table.

Screenshot 2022-05-24 at 15 23 43

I would expect the table block to also have controls for cell padding and gap, but I suppose this is another issue?

@scruffian
Copy link
Contributor Author

I think so yes although I might expect the padding/spacing to be applied to the table tag itself - which we can do using __experimentalSelector...

@draganescu
Copy link
Contributor

The table block's block.json already uses "__experimentalSelector": ".wp-block-table > table" and the __experimentalBorder supports applies to it, but spacing (margin and padding) seem to ignore it.

@jordesign
Copy link
Contributor

I"m seeing margin and padding support for the Table block now (in WP6.3) so closing this as resolved.

Uploading Screenshot 2023-09-05 at 2.47.23 pm.png…

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] Blocks Overall functionality of blocks
Projects
None yet
Development

No branches or pull requests

3 participants