svooltip icon indicating copy to clipboard operation
svooltip copied to clipboard

Request: Automatically add data-placement when auto-placement causes tooltip to move

Open saturnonearth opened this issue 1 year ago • 0 comments

I have some CSS classes as follows:

.svooltip[data-placement^='top'] .svooltip-arrow {
	@apply border-b border-r;
}
.svooltip[data-placement^='bottom'] .svooltip-arrow {
	@apply border-t border-l;
}

But the issue is, they are not applied when the tooltip is overflowing and changes position, so I end up getting the incorrect classes for the position that it's in.

Example:

Correct placement:

CleanShot 2024-02-02 at 16 03 51@2x

When it overflows: CleanShot 2024-02-02 at 16 04 27@2x

Notice the arrow border

saturnonearth avatar Feb 02 '24 21:02 saturnonearth