Skip to content

Commit

Permalink
Post Template: Add Border and Spacing Support (#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 <shailu25@git.wordpress.org>
Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: paaljoachim <paaljoachim@git.wordpress.org>
Co-authored-by: shimotmk <shimotomoki@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
  • 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

1 comment on commit 261979a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 261979a.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12499132448
📝 Reported issues:

Please sign in to comment.