-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
WIP: Move search block alignment from float to flex #31812
Conversation
margin-left: 0; | ||
} | ||
.wp-block-search__label { | ||
min-width: 220px !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ugly, but the RichText component adds a minWidth of 1px as an inline style with no option to specify a custom width, if we go with this approach we should probably add a minWidth prop to this component, the native version has this. FYI, this min width setting is only needed to make right align work on 20% width.
Size Change: +557 B (0%) Total Size: 1.32 MB
ℹ️ View Unchanged
|
We could simplify this a little if we add a div wrapper around the label and search input box and assign the %width to that instead of having to add it to both those elements, and this would also get around the label richtext box min width issue. |
Description
Currently right align doesn't play nice with the %width selections, and also doesn't float to the very edge of the page. This seems to be an issue with the way browsers deal with floated items with width applied. I couldn't find a fix for this other than moving to a flex layout, but not sure what the implications of moving from a float are in terms of backwards compat with themes, etc.
To test
Screenshots
Before:
After: