Skip to content

Commit

Permalink
Add spacing support to the Categories block. (#43647)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndiego committed Sep 6, 2022
1 parent ffd75bd commit ec29b9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Expand Up @@ -77,7 +77,7 @@ Display a list of all categories. ([Source](https://github.com/WordPress/gutenbe

- **Name:** core/categories
- **Category:** widgets
- **Supports:** align, typography (fontSize, lineHeight), ~~html~~
- **Supports:** align, spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** displayAsDropdown, showEmpty, showHierarchy, showOnlyTopLevel, showPostCounts

## Code
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/categories/block.json
Expand Up @@ -31,6 +31,10 @@
"supports": {
"align": true,
"html": false,
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
Expand Down
3 changes: 3 additions & 0 deletions packages/block-library/src/categories/style.scss
@@ -1,4 +1,7 @@
.wp-block-categories {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;

&.alignleft {
/*rtl:ignore*/
margin-right: 2em;
Expand Down

0 comments on commit ec29b9c

Please sign in to comment.