Skip to content

Commit

Permalink
[@mantine/core] Fix arrow overlaying Popover, Tooltip and HoverCard c…
Browse files Browse the repository at this point in the history
…ontent in some cases (#7148)

Add clip paths to floating arrow to prevent larger arrow sizes from being visible when hovering a child component (like in menus)
  • Loading branch information
th3fallen authored Nov 23, 2024
1 parent 7fad3d6 commit 1e23e6f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export function getArrowPositionStyles({
right: arrowPlacement,
borderLeftColor: 'transparent',
borderBottomColor: 'transparent',
clipPath: 'polygon(100% 0, 0 0, 100% 100%)',
};
}

Expand All @@ -106,6 +107,7 @@ export function getArrowPositionStyles({
left: arrowPlacement,
borderRightColor: 'transparent',
borderTopColor: 'transparent',
clipPath: 'polygon(0 100%, 0 0, 100% 100%)',
};
}

Expand All @@ -116,6 +118,7 @@ export function getArrowPositionStyles({
bottom: arrowPlacement,
borderTopColor: 'transparent',
borderLeftColor: 'transparent',
clipPath: 'polygon(0 100%, 100% 100%, 100% 0)',
};
}

Expand All @@ -126,6 +129,7 @@ export function getArrowPositionStyles({
top: arrowPlacement,
borderBottomColor: 'transparent',
borderRightColor: 'transparent',
clipPath: 'polygon(0 100%, 0 0, 100% 0)',
};
}

Expand Down

0 comments on commit 1e23e6f

Please sign in to comment.