Skip to content

Commit

Permalink
Tag Cloud Block: Prevent block support styles and additional CSS clas…
Browse files Browse the repository at this point in the history
…ses from being printed twice (#44439)

* Tag Cloud Block: Prevent block support styles and additional CSS classes from being printed twice

* Fix Typo

Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com>

* Fix Typo

Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com>

* Use new  option

* move the box-sizing: border-box to the style.scss file

Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com>
  • Loading branch information
t-hamano and aaronrobertshaw committed Oct 11, 2022
1 parent e435413 commit 63d83dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/tag-cloud/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function TagCloudEdit( { attributes, setAttributes, taxonomies } ) {
{ inspectorControls }
<div { ...useBlockProps() }>
<ServerSideRender
key="tag-cloud"
skipBlockSupportAttributes
block="core/tag-cloud"
attributes={ attributes }
/>
Expand Down
3 changes: 3 additions & 0 deletions packages/block-library/src/tag-cloud/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.wp-block-tag-cloud {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;

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

0 comments on commit 63d83dd

Please sign in to comment.