SelectControl: Remove the line height setting to fix issue with font descenders being cut off#40985
Merged
glendaviesnz merged 2 commits intotrunkfrom May 12, 2022
Merged
Conversation
Member
ramonjd
approved these changes
May 11, 2022
Member
ramonjd
left a comment
There was a problem hiding this comment.
Left a note about narrow screens.
Happy to look again if there's a fix in this PR or a follow up.
Contributor
Author
|
@ramonjd it seems like the following padding css from WP core is the cause of the issue: .wp-core-ui select {
padding: 5px 24px 5px 8px;
}I have pushed an update which resets the top and bottom padding and this seems to fix the issue in wide and narrow screens now. |
Member
|
More screenshots === LGTM! 💻📱 |
Contributor
|
Thank you for working on this ❤️ Just a small nit — when working in the |
Contributor
Author
Sure, thanks for the reminder, and thanks for adding the details for this one for me 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









What?
Removes the fixed lineheight 1 the SelectControl component
Why?
In places like the Gallery block Image size selector this lineheight setting causes font descenders to be cut off
Fixes: #27194
How?
Just removes the lineheight setting and allows it to be inherited
Testing Instructions
Largeoptiongin theLargeis not cut offScreenshots or screencast
Before:

After:
