Skip to content

Commit

Permalink
Page List : Add border and spacing support (WordPress#66385)
Browse files Browse the repository at this point in the history
* Border support added for Page-list block

* Border support added for Page-list block

* Adding spacing support for page list

* Doc Build

* Update packages/block-library/src/page-list/block.json

Co-authored-by: Aaron Robertshaw <[email protected]>

* Update packages/block-library/src/page-list/block.json

Suggestion commit

Co-authored-by: Aaron Robertshaw <[email protected]>

* Unwanted Comma removed

* border-box added

---------
Co-authored-by: ramonjd <[email protected]>
Co-authored-by: benazeer1909 <[email protected]>
Co-authored-by: akasunil <[email protected]>
Co-authored-by: Aaron Robertshaw <[email protected]>
  • Loading branch information
5 people authored Nov 18, 2024
1 parent 1490795 commit 89cba32
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ Display a list of all pages. ([Source](https://github.com/WordPress/gutenberg/tr
- **Name:** core/page-list
- **Category:** widgets
- **Allowed Blocks:** core/page-list-item
- **Supports:** interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
- **Supports:** interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
- **Attributes:** isNested, parentPageID

## Page List Item
Expand Down
14 changes: 14 additions & 0 deletions packages/block-library/src/page-list/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@
},
"interactivity": {
"clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true
},
"spacing": {
"padding": true,
"margin": true,
"__experimentalDefaultControls": {
"padding": false,
"margin": false
}
}
},
"editorStyle": "wp-block-page-list-editor",
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/page-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
background-color: inherit;
}
}
.wp-block-page-list {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;
}

0 comments on commit 89cba32

Please sign in to comment.