Skip to content

Commit

Permalink
Avatar: add padding support (#43519)
Browse files Browse the repository at this point in the history
* Update DateTimePicker readme

* Add padding support for Avatar block

* add box-sizing for frontend

* Additional comment clarification for box-sizing
  • Loading branch information
colorful-tones committed Sep 6, 2022
1 parent ec29b9c commit 3b4526a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Expand Up @@ -32,7 +32,7 @@ Add a user's avatar. ([Source](https://github.com/WordPress/gutenberg/tree/trunk

- **Name:** core/avatar
- **Category:** theme
- **Supports:** align, color (~~background~~, ~~text~~), spacing (margin), ~~alignWide~~, ~~html~~
- **Supports:** align, color (~~background~~, ~~text~~), spacing (margin, padding), ~~alignWide~~, ~~html~~
- **Attributes:** isLink, linkTarget, size, userId

## Reusable block
Expand Down
3 changes: 2 additions & 1 deletion packages/block-library/src/avatar/block.json
Expand Up @@ -29,7 +29,8 @@
"align": true,
"alignWide": false,
"spacing": {
"margin": true
"margin": true,
"padding": true
},
"__experimentalBorder": {
"__experimentalSkipSerialization": true,
Expand Down
3 changes: 3 additions & 0 deletions packages/block-library/src/avatar/style.scss
@@ -1,4 +1,7 @@
.wp-block-avatar {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;

&.aligncenter {
text-align: center;
}
Expand Down

0 comments on commit 3b4526a

Please sign in to comment.