Skip to content
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

[EuiTextArea] Fix extra 2-3px of height caused by display: inline-block #7607

Merged
merged 2 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/upcoming/7607.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Bug fixes**

- Fixed `EuiTextArea`'s CSS box model to no longer render a few extra pixels of strut height
5 changes: 5 additions & 0 deletions src/components/form/text_area/_text_area.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
@include euiFormControlStyle;
line-height: $euiLineHeight; // give more spacing between multiple lines

// <textarea>s default to `inline-block`, which causes an extra 2-3px of
// unnecessary height within its parent `block` form control wrapper.
// @see https://stackoverflow.com/a/27536461/4294462
display: block;

// Textareas have their own sizing
&,
&--compressed {
Expand Down
Loading