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

Query No Results: Add Border & Spacing Support #64601

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
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 @@ -725,7 +725,7 @@ Contains the block elements used to render content when no query results are fou
- **Name:** core/query-no-results
- **Category:** theme
- **Parent:** core/query
- **Supports:** align, color (background, gradients, link, text), interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
- **Supports:** align, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~

## Pagination

Expand Down
17 changes: 16 additions & 1 deletion packages/block-library/src/query-no-results/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
"gradients": true,
"link": true
},
"spacing": {
"padding": true,
"margin": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
Expand All @@ -31,6 +39,13 @@
},
"interactivity": {
"clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true
}
}
},
"style": "wp-block-query-no-results"
}
4 changes: 4 additions & 0 deletions packages/block-library/src/query-no-results/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.wp-block-query-no-results {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;
}
1 change: 1 addition & 0 deletions packages/block-library/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
@import "./post-template/style.scss";
@import "./query-pagination/style.scss";
@import "./query-title/style.scss";
@import "./query-no-results/style.scss";
@import "./quote/style.scss";
@import "./read-more/style.scss";
@import "./rss/style.scss";
Expand Down
Loading