Skip to content

Commit

Permalink
Set FlexGroup to grow: 1 to be more friendly with IE11 (#315)
Browse files Browse the repository at this point in the history
Apply flex-grow to EuiFlexGroup for nested ie11 bug
  • Loading branch information
snide authored Jan 17, 2018
1 parent 15b2c31 commit b59cf36
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src-docs/src/views/flex/flex_nest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@ import {
export default () => (
<div>
<EuiFlexGroup>
<EuiFlexItem grow={false}>Group One</EuiFlexItem>
<EuiFlexItem grow={false}>
<div>Group Two</div>
<div>Flex Group</div>
<EuiSpacer />
<EuiFlexGroup>
<EuiFlexItem>Nested Grid One</EuiFlexItem>
<EuiFlexItem>Nested Grid Two</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<div>Flex Grid</div>
<EuiSpacer />
<EuiFlexGrid columns={3}>
<EuiFlexItem>Nested Grid One</EuiFlexItem>
Expand Down
8 changes: 7 additions & 1 deletion src/components/flex/_flex_group.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
/**
* 1. Not always needed, but fixes an IE11 issue when flex-groups are nested under display: flex elements.
* 2. IE requires a unit to grow.
*/

.euiFlexGroup {
display: flex;
align-items: stretch;
flex-grow: 1; /* 1 */

.euiFlexItem {
flex-grow: 1;
flex-basis: 0%;
flex-basis: 0%; /* 1 */
}
}

Expand Down

0 comments on commit b59cf36

Please sign in to comment.