Skip to content

Commit

Permalink
Post Template: Add Border and Spacing Support (WordPress#64425)
Browse files Browse the repository at this point in the history
* Post Template: Add Border and Spacing Support

* fix conflict issue

* Added Border & Spacing Controls Optional

* fix conflict issue

* Fixed Lint Issue

* Added Suggested Changes

* Added Suggested Changes

* Added Suggested Changes

* Added Suggested Changes

Co-authored-by: shail-mehta <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: paaljoachim <[email protected]>
Co-authored-by: shimotmk <[email protected]>
Co-authored-by: jameskoster <[email protected]>
Co-authored-by: jasmussen <[email protected]>
  • Loading branch information
8 people authored Dec 26, 2024
1 parent 61d7404 commit 261979a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ Contains the block elements used to render a post, like the title, date, feature
- **Name:** core/post-template
- **Category:** theme
- **Ancestor:** core/query
- **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), layout, spacing (blockGap), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
- **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), layout, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~

## Post Terms

Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
@import "./template-part/editor.scss";
@import "./text-columns/editor.scss";
@import "./video/editor.scss";
@import "./post-template/editor.scss";
@import "./query/editor.scss";
@import "./query-pagination/editor.scss";
@import "./query-pagination-numbers/editor.scss";
Expand Down
12 changes: 11 additions & 1 deletion packages/block-library/src/post-template/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,25 @@
}
},
"spacing": {
"margin": true,
"padding": true,
"blockGap": {
"__experimentalDefault": "1.25em"
},
"__experimentalDefaultControls": {
"blockGap": true
"blockGap": true,
"padding" : false,
"margin" : false
}
},
"interactivity": {
"clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true
}
},
"style": "wp-block-post-template",
Expand Down
7 changes: 0 additions & 7 deletions packages/block-library/src/post-template/editor.scss

This file was deleted.

2 changes: 2 additions & 0 deletions packages/block-library/src/post-template/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
max-width: 100%;
list-style: none;
padding: 0;
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;

// These rules no longer apply but should be kept for backwards compatibility.
&.is-flex-container {
Expand Down

0 comments on commit 261979a

Please sign in to comment.