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

[Emotion] Convert EuiPortal #6075

Merged
merged 4 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
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`