Skip to content

Commit 357e8cf

Browse files
aaronrobertshawandrewserong
authored andcommitted
Comments Pagination: Add padding, margin, and block gap support (WordPress#83744)
Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
1 parent bc007f1 commit 357e8cf

4 files changed

Lines changed: 13 additions & 1 deletion

File tree

‎docs/reference-guides/core-blocks/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Displays a paginated navigation to next/previous set of comments, when applicabl
255255
- **Category:** [theme](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/)
256256
- **Parent:** core/comments
257257
- **Allowed Blocks:** core/comments-pagination-previous, core/comments-pagination-numbers, core/comments-pagination-next
258-
- **Supports:** align, anchor, background (gradient), color (background, gradients, link, text), interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
258+
- **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~~
259259
- **Attributes:** paginationArrow
260260

261261
## Comments Next Page

‎packages/block-library/src/comments-pagination/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
4343
- [`allowSwitching`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-allowswitching): `false`
4444
- [`allowInheriting`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-allowinheriting): `false`
4545
- [`default`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-default): `{"type":"flex"}`
46+
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
47+
- `padding`: `true`
48+
- `margin`: `true`
49+
- `blockGap`: `true`
4650
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
4751
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
4852
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`

‎packages/block-library/src/comments-pagination/block.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
"type": "flex"
5151
}
5252
},
53+
"spacing": {
54+
"padding": true,
55+
"margin": true,
56+
"blockGap": true
57+
},
5358
"typography": {
5459
"fontSize": true,
5560
"lineHeight": true,

‎packages/block-library/src/comments-pagination/style.scss‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
$pagination-margin: 0.5em;
22
.wp-block-comments-pagination {
3+
// This block has customizable padding, border-box makes that more predictable.
4+
box-sizing: border-box;
5+
36
// Increased specificity to override blocks default margin.
47
> .wp-block-comments-pagination-next,
58
> .wp-block-comments-pagination-previous,

0 commit comments

Comments
 (0)