Gutenberg: Group Block: add ability to alter padding values

Created on 1 Apr 2019  路  6Comments  路  Source: WordPress/gutenberg

The Section Block currently has padding added when a background color is set. It would be good to be able to adjust this setting regardless of whether there is a background color set.

Describe the solution you'd like
A UI to enable the adjusting of the Block inner padding. This should

  • Allow pixel level adjustment of the Block padding
  • Allow adjustment of the 4 values independently of each other or as a single value

Potential Considerations

  • What should happen with different viewport sizes? For exmaple a large padding that looks great on large screens would look terrible on small screens. How do we handle this?
[Block] Group [Feature] Design Tools [Status] In Progress [Type] Enhancement

Most helpful comment

@mtias I've started work on an implementation of this.

All 6 comments

I think there's already an issue about this (related to responsive controls), this might be a duplicate.

I would think that the Group block could go ahead as an example on how to add block specific padding/margin controls. Getting it in place so that down the line it could also be added to other blocks.

I am adding in some issues.

Block-specific responsive controls

13363

Add padding and margin for blocks, and get rid of Spacer block.
https://github.com/WordPress/gutenberg/issues/11824

Add Block: Responsive

6650

Support for Responsive Columns

6048

I like starting with this block to see how specific controls might work.

@mtias I've started work on an implementation of this.

I'm removing the Needs Design label because it looks like the design work in happening in the PR.

@ItsJonQ could we look at enabling the padding control from _Cover_ here?

Was this page helpful?
0 / 5 - 0 ratings