Skip to content

Commit

Permalink
Fix EuiPageContent centering (#527)
Browse files Browse the repository at this point in the history
This fixes a very old bug introduced when EuiPanel took on flex abilities based upon if it was placed in a flex item. That change broke a couple instances of positioning in EuiPage, where panels nest inside of flex layouts.

This change sets the grow to 0 for EuiPageCOntent, which itself is an EuiPanel. The specificity is changed so we don't need to resort to !important tags.
  • Loading branch information
snide authored Mar 16, 2018
1 parent 448c578 commit 12cb5d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `0.0.28`.
**Bug fixes**

- Fix `EuiPageContent` centering within `EuiPage` issue ([#527](https://github.com/elastic/eui/pull/527))

# [`0.0.28`](https://github.com/elastic/eui/tree/v0.0.28)

Expand Down
16 changes: 9 additions & 7 deletions src/components/page/page_content/_page_content.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
.euiPageContent {
width: 100%;
}

.euiPageContent--verticalCenter {
align-self: center;
}
&.euiPageContent--verticalCenter {
align-self: center;
}

.euiPageContent--horizontalCenter {
width: auto;
margin: auto;
&.euiPageContent--horizontalCenter {
width: auto;
margin: auto;
flex-grow: 0; // Offsets the properties of .euiPanel within flexboxes
}
}


@include screenXSmall {
.euiPageContent {
border-radius: 0;
Expand Down

0 comments on commit 12cb5d2

Please sign in to comment.