Skip to content
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
3 changes: 2 additions & 1 deletion src/components/overlay_mask/overlay_mask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export const EuiOverlayMask: FunctionComponent<EuiOverlayMaskProps> = ({
useEffect(() => {
if (!overlayMaskNode) return;
overlayMaskNode.className = classNames('euiOverlayMask', className);
}, [overlayMaskNode, className]);
overlayMaskNode.dataset.relativeToHeader = headerZindexLocation;
}, [overlayMaskNode, className, headerZindexLocation]);

return (
<EuiPortal portalRef={combinedMaskRef}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Random aside while I'm here: I'm really not a huge fan of how <Global> was used here to set .euiOverlayMask styles. This is exactly the kind of use case we should be using @emotion/css for instead. I've updated my emotion/CSS PR to convert this accordingly: 04a81c6

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the extra conversion! Today I re-Learned about the cx function

Expand Down
3 changes: 3 additions & 0 deletions upcoming_changelogs/6289.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Bug fixes**

- Fixed `EuiOverlayMask` to set a `[data-relative-to-header=above|below]` attribute to replace the `--aboveHeader` and `--belowHeader` classNames removed in its Emotion conversion