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

Allow block markup to modify blockGap values #35778

Closed
kjellr opened this issue Oct 19, 2021 · 3 comments
Closed

Allow block markup to modify blockGap values #35778

kjellr opened this issue Oct 19, 2021 · 3 comments
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement.

Comments

@kjellr
Copy link
Contributor

kjellr commented Oct 19, 2021

We should allow block markup like this to modify the blockGap property for a single instance of a block. For example:

<!-- wp:group {"style": { "spacing": { "blockGap": "10px" } } } -->

Ideally, we could modify the row and column gap individually. Not sure about the naming here, but for example:

<!-- wp:group {"style": { "spacing": { "blockGap": {"vertical":"10px","horizontal":"15px" } } } -->

This would be useful in block patterns and templates, when you need just a one-off adjustment.

@kjellr kjellr added [Type] Enhancement A suggestion for improvement. [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Oct 19, 2021
@ramonjd
Copy link
Member

ramonjd commented Oct 26, 2021

Thanks for creating this issue.

We're experimenting with something in #35454 and over in #35301 that (so far) saves the following block markup:

<!-- wp:columns {"style":{"spacing":{"blockGap":{"row":"90px","column":"90px"}}}} -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

Good to know there's another use case for splitting blockGap into row/column.

cc @stacimc

@mtias
Copy link
Member

mtias commented Aug 2, 2023

@ramonjd is this issue still relevant?

@ramonjd
Copy link
Member

ramonjd commented Aug 2, 2023

Thanks for the ping.

General axial block gap support was added in:

@andrewserong pointed out to me that there's now an issue specific to the Row/Group block:

I think we can close this one.

@ramonjd ramonjd closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants