[EuiTextArea] Fix extra 2-3px of height caused by display: inline-block
#7607
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.
Summary
@yansavitski super awesomely pointed out to us in Slack that
inline-block
displays produce struts, which make room for descenders, hence the extra 2-3px. Another helpful comment from StackOverflow:Setting
vertical-align: top
works for Chrome but not for Firefox. Since our textarea component doesn't need descender logic at all, or inline behavior (since it's already wrapped in a<div>
form control wrapper), the easiest solution is to simply setdisplay: block
onEuiTextArea
to eliminate the extra height.QA
<textarea>
element and the 2 div wrappers above it, and confirm all are the exact same pixel heightGeneral checklist
- [ ] Checked in both light and dark modes- [ ] Checked in mobile- [ ] Checked for accessibility including keyboard-only and screenreader modes- [ ] If applicable, added the breaking change issue label (and filled out the breaking change checklist)