-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Block Search: Fixed the issue of width not updating to 25% #61758
base: trunk
Are you sure you want to change the base?
Conversation
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Hi @amitraj2203 I did not understand how the change solves that the setting doesn't work when you enter a pixel value? |
Hi @carolinan, I created this PR for issue #60414. Now have fixed the issue where the Search block width setting did not work correctly the first time the px value was updated. After reviewing the issue #34469, I found a discussion about removing the min-width. By doing this, the initial width would still be 220px, but it would allow us to change the width to any value. Additionally, on the frontend, the button block uses the styles of the default button, which reduces the width of the search input. Consequently, the Search block will have the same width as in the editor, but the ratio will differ due to the different button styles. Screen.Recording.2024-06-04.at.1.52.29.PM.mov |
What?
Fixes: #60414
Why?
In the Search block, when we put width 25% in the editor, it doesn't get applied on the frontend.
How?
I noticed that the search block has CSS set in the editor to ensure a minimum width of 220px because if the width goes beyond this value, it doesn't look good in terms of styling. Therefore, adding this to the frontend resolves the issue.
Testing Instructions
Testing Instructions for Keyboard
NIL