diff --git a/packages/block-library/src/query-pagination/style.scss b/packages/block-library/src/query-pagination/style.scss index 95da9e1231f5d6..db5e90232532d0 100644 --- a/packages/block-library/src/query-pagination/style.scss +++ b/packages/block-library/src/query-pagination/style.scss @@ -13,6 +13,20 @@ $pagination-margin: 0.5em; margin-right: 0; } } + + // This moves the next link to the right side of the container, + // which is important when it's the only block displayed + // and the block has a "space-between" justification. + &.is-content-justification-space-between { + > .wp-block-query-pagination-next:last-child { + margin-inline-start: auto; + } + > .wp-block-query-pagination-previous:first-child { + margin-inline-end: auto; + } + } + + .wp-block-query-pagination-previous-arrow { margin-right: 1ch; display: inline-block; // Needed so that the transform works.