Block Gap: Add configuration for horizontal and vertical block gaps #34347
Comments
I'm a bit confused, wouldn't that still just be block gap just in a horizontal container? There's never both a horizontal and vertical gap at the same time at a container level, so discriminating doesn't seem to make a lot of sense? |
That could work, but I don't think we have a way to set different block gaps in each container do we? The other benefit of the approach I suggest is that we would only need to set it in one place rather than for every container. |
#33991 this should solve it. From the theme.json perspective, it's already possible to define different gaps for different block types. |
What we need to do as well is to refactor the existing horizontal blocks to use the "flex" layout that way they don't get polluted with CSS that is not targeted for them. (buttons, social links, navigation, columns) |
scruffian commentedAug 27, 2021
•
edited
What problem does this address?
The new "blockGap" setting gets applies to blocks whether they are stacked vertically or horizontally. In many themes the spacing want between blocks is different in the horizontal and vertical directions.
What is your proposed solution?
It would be useful to be able to specify a "vertical" and "horizontal" value for "blockGap", to have more control over this.
For an example of the problem see Automattic/themes#4468
The text was updated successfully, but these errors were encountered: