Skip to content

Commit 1e23e6f

Browse files
authored
[@mantine/core] Fix arrow overlaying Popover, Tooltip and HoverCard content 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)
1 parent 7fad3d6 commit 1e23e6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/@mantine/core/src/components/Floating/FloatingArrow/get-arrow-position-styles.ts

+4
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export function getArrowPositionStyles({
9696
right: arrowPlacement,
9797
borderLeftColor: 'transparent',
9898
borderBottomColor: 'transparent',
99+
clipPath: 'polygon(100% 0, 0 0, 100% 100%)',
99100
};
100101
}
101102

@@ -106,6 +107,7 @@ export function getArrowPositionStyles({
106107
left: arrowPlacement,
107108
borderRightColor: 'transparent',
108109
borderTopColor: 'transparent',
110+
clipPath: 'polygon(0 100%, 0 0, 100% 100%)',
109111
};
110112
}
111113

@@ -116,6 +118,7 @@ export function getArrowPositionStyles({
116118
bottom: arrowPlacement,
117119
borderTopColor: 'transparent',
118120
borderLeftColor: 'transparent',
121+
clipPath: 'polygon(0 100%, 100% 100%, 100% 0)',
119122
};
120123
}
121124

@@ -126,6 +129,7 @@ export function getArrowPositionStyles({
126129
top: arrowPlacement,
127130
borderBottomColor: 'transparent',
128131
borderRightColor: 'transparent',
132+
clipPath: 'polygon(0 100%, 0 0, 100% 0)',
129133
};
130134
}
131135

0 commit comments

Comments
 (0)