Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Comments Pagination: Add padding, margin, and block gap support
  • Loading branch information
aaronrobertshaw committed Sep 29, 2026
commit 70eee98b0bc6ad490d00778067cdab82f86c7db2
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ Displays a paginated navigation to next/previous set of comments, when applicabl
- **Category:** [theme](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/)
- **Parent:** core/comments
- **Allowed Blocks:** core/comments-pagination-previous, core/comments-pagination-numbers, core/comments-pagination-next
- **Supports:** align, anchor, background (gradient), color (background, gradients, link, text), interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
- **Supports:** align, anchor, background (gradient), color (background, gradients, link, text), interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
- **Attributes:** paginationArrow

## Comments Next Page
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/comments-pagination/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
- [`allowSwitching`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-allowswitching): `false`
- [`allowInheriting`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-allowinheriting): `false`
- [`default`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-default): `{"type":"flex"}`
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
- `padding`: `true`
- `margin`: `true`
- `blockGap`: `true`
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`
Expand Down
5 changes: 5 additions & 0 deletions packages/block-library/src/comments-pagination/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
"type": "flex"
}
},
"spacing": {
"padding": true,
"margin": true,
"blockGap": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
Expand Down
3 changes: 3 additions & 0 deletions packages/block-library/src/comments-pagination/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
$pagination-margin: 0.5em;
.wp-block-comments-pagination {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;

// Increased specificity to override blocks default margin.
> .wp-block-comments-pagination-next,
> .wp-block-comments-pagination-previous,
Expand Down
Loading