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

Fix IE specific flexbox min-height issue #66555

Merged
merged 7 commits into from
May 19, 2020
Merged
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion src/core/public/rendering/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@
display: flex;
flex-flow: column nowrap;
margin: 0 auto;
min-height: calc(100vh - #{$euiHeaderHeightCompensation});
// IE needs this to be "height" instead of "min-height"
// "min-height" causes a bug described in the next link
// https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items
height: calc(100vh - #{$euiHeaderHeightCompensation});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with this switch is that the scrolls now must be managed by internal views. Not a huge deal, but we really try to keep the window scroll on the window instead of an individual element. If this problem truly only affected IE, let's keep min-height by default but change to height only for IE:

  min-height: calc(100vh - #{$euiHeaderHeightCompensation});

  @include internetExplorerOnly {
    // IE needs this to be "height" instead of "min-height"
    // "min-height" causes a bug described in the next link
    // https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items
    height: calc(100vh - #{$euiHeaderHeightCompensation});
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cchaos thanks for useful suggestion!
Done.


&.hidden-chrome {
min-height: 100vh;
Expand Down