Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post Template: Add Border and Spacing Support #64425

Merged
merged 9 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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;
t-hamano marked this conversation as resolved.
Show resolved Hide resolved

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