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

[7.4] [Code] Search results are fixed to top of page (#45182) #45426

Merged
merged 1 commit into from
Sep 11, 2019

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Sep 11, 2019

Backports the following commits to 7.4:

* Fix main search bar to top of screen

By allowing overflow on the main content, we implicitly fix the sibling
search bar in position.

elastic/code#1606

* Allow search suggestion text to be truncated

This gives the parent element a width, so that our text-overflow
rules apply to these elements.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1086218#c4 for details
on the issue.

* Fix alignment issue with overflowed search suggestions

If both the icon and the text are allowed to grow/shrink as needed,
flexbox will grow truncated text based on its original width, leading to
subtle sub-pixel alignment issues with other rows.

By fixing the icon to a specific width, we can ensure that the
suggestion text does not grow too big.

* Remove unneeded CSS

We don't need to flex these elements currently as they contain either no
children or inline elements only.

* style: prefer camelCase element names over hyphens

* Fix search result suggestion overflow on IE

Without this directive on the parent, it had no width or flex growth and
didn't respect the parent width. This allows it to take on the correct
flexed width, and thus take on the overflow rules.

* Remove unused CSS rule

We have an overriding align-items declaration immediately after this
one.
@rylnd rylnd added the backport label Sep 11, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@rylnd rylnd merged commit 518a88d into elastic:7.4 Sep 11, 2019
@rylnd rylnd deleted the backport/7.4/pr-45182 branch September 11, 2019 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants