Skip to content

Allow block markup to modify blockGap values #35778

Closed

Description

@kjellr

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.

Activity

  1. added
    [Type] Enhancement
    [Feature] Design Tools
    on Oct 19, 2021
  2. ramonjd commented on Oct 26, 2021

    @ramonjd
    Member

    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

  3. mtias commented on Aug 2, 2023

    @mtias
    Member

    @ramonjd is this issue still relevant?

  4. ramonjd commented on Aug 2, 2023

    @ramonjd
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Design Tools[Type] Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions