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

Block Gap: Add configuration for horizontal and vertical block gaps #34347

Open
scruffian opened this issue Aug 27, 2021 · 4 comments
Open

Block Gap: Add configuration for horizontal and vertical block gaps #34347

scruffian opened this issue Aug 27, 2021 · 4 comments
Assignees

Comments

@scruffian
Copy link
Contributor

@scruffian scruffian commented Aug 27, 2021

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

@mtias
Copy link
Contributor

@mtias mtias commented Aug 27, 2021

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?

@scruffian
Copy link
Contributor Author

@scruffian scruffian commented Aug 27, 2021

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.

@youknowriad
Copy link
Contributor

@youknowriad youknowriad commented Aug 27, 2021

That could work, but I don't think we have a way to set different block gaps in each container do we?

#33991 this should solve it.

From the theme.json perspective, it's already possible to define different gaps for different block types.

@youknowriad
Copy link
Contributor

@youknowriad youknowriad commented Aug 27, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants