Skip to content

Commit

Permalink
Search block: update alignment and icon button width (#54773)
Browse files Browse the repository at this point in the history
* Render rich text button as a button so that it inherits the default button styles, mainly the text:center
Remove max-width change so that it doesn't affect search buttons in the header

* Render rich text button as a button so that it inherits the default button styles, mainly the text:center
Remove max-width change for buttons with icons only so that it doesn't affect search button icons in the header or in narrow widths

* Revert tagName on Richtext
Achieve centered text via text-align in editor.scss
  • Loading branch information
ramonjd authored Sep 26, 2023
1 parent c8fa0db commit 6c9738c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/block-library/src/search/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}

&__components-button-group {
Expand Down
3 changes: 3 additions & 0 deletions packages/block-library/src/search/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ $button-spacing-y: math.div($grid-unit-15, 2); // 6px
flex-shrink: 0;
// Ensure minimum input field width in small viewports.
max-width: calc(100% - 100px);
&.has-icon {
max-width: 100%;
}
}
}

Expand Down

1 comment on commit 6c9738c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 6c9738c.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6307635399
📝 Reported issues:

Please sign in to comment.