Skip to content

Commit

Permalink
[Emotion] Convert EuiPortal (#6075)
Browse files Browse the repository at this point in the history
* [Emotion] Convert `EuiPortal`

* Added CL

* Better CL
  • Loading branch information
miukimiu authored Jul 28, 2022
1 parent b17a335 commit 1e9103e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
@import 'pagination/index';
@import 'panel/index';
@import 'page/index'; // Page needs to come after Panel for cascade specificity
@import 'portal/index';
@import 'tree_view/index';
@import 'resizable_container/index';
@import 'side_nav/index';
Expand Down
1 change: 0 additions & 1 deletion src/components/portal/_index.scss

This file was deleted.

6 changes: 0 additions & 6 deletions src/components/portal/_portal.scss

This file was deleted.

6 changes: 6 additions & 0 deletions src/global_styling/reset/global_styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ export const EuiGlobalStyles = ({}: EuiGlobalStylesProps) => {
text-decoration: none;
}
}
// A few EUI components (e.g. tooltip, combobox) use a portal to render content outside of the DOM hierarchy.
// The portal content is absolutely positioned relative to the body.
.euiBody-hasPortalContent {
position: relative;
}
`;

return <Global styles={styles} />;
Expand Down
3 changes: 3 additions & 0 deletions upcoming_changelogs/6075.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**CSS-in-JS conversions**

- Moved `.euiBody-hasPortalContent` styles that used to live in `_portal.scss` to Emotion `EuiGlobalStyles`

0 comments on commit 1e9103e

Please sign in to comment.