Skip to content

Add margin block support to the core/query-pagination block. #68428

@daviedR

Description

@daviedR

What problem does this address?

When designing a query layout, designers might want to give a space between the Post Template (core/post-template) and Pagination (core/query-pagination). This space should not be persistent, because pagination is situational and might not be rendered depending on the query results. Using a Spacer block is imperfect because the space block is still there even when the pagination is not rendered.

A possible workaround is to wrap the Post Template and Pagination block into a Group (core/group) block and give the group a block spacing. This will add space between the Post Template and the Pagination block. It works on the front end, but somehow the block spacing doesn't appear in the editor. Bug?

What is your proposed solution?

Add margin support to the Pagination block, so the space can be added to the Pagination block and not persistent. When the query doesn't render pagination, there is no unneeded extra space after the Post Template block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Block] Query PaginationAffects the Query Pagination Block - used for pagination within the Query Loop Block[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions