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

Pagination Block: Fix inconsistent margins between editor and frontend #64874

Merged
merged 9 commits into from
Sep 4, 2024
20 changes: 0 additions & 20 deletions packages/block-library/src/query-pagination/editor.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
$pagination-margin: 0.5em;

// Center flex items. This has an equivalent in style.scss.
.wp-block[data-align="center"] > .wp-block-query-pagination {
justify-content: center;
Expand All @@ -14,21 +12,3 @@ $pagination-margin: 0.5em;
}
}

.wp-block-query-pagination {
> .wp-block-query-pagination-next,
> .wp-block-query-pagination-previous,
> .wp-block-query-pagination-numbers {
// Override editor auto block margins.
margin-left: 0;
margin-top: $pagination-margin;

/*rtl:ignore*/
margin-right: $pagination-margin;
margin-bottom: $pagination-margin;

&:last-child {
/*rtl:ignore*/
margin-right: 0;
}
}
}
15 changes: 0 additions & 15 deletions packages/block-library/src/query-pagination/style.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
$pagination-margin: 0.5em;
.wp-block-query-pagination {
// Increased specificity to override blocks default margin.
> .wp-block-query-pagination-next,
> .wp-block-query-pagination-previous,
> .wp-block-query-pagination-numbers {
/*rtl:ignore*/
margin-right: $pagination-margin;
margin-bottom: $pagination-margin;

&:last-child {
/*rtl:ignore*/
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.
Expand Down
Loading