Skip to content

Commit

Permalink
Added buffer to all sides of Tooltip's floating content (#2359)
Browse files Browse the repository at this point in the history
  • Loading branch information
smmr-dn authored Nov 27, 2024
1 parent 3f2b369 commit 87bbc99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/clean-worms-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@itwin/itwinui-css': patch
---

The `Tooltip` now remains visible when hovered up to `4px` outside its border.
8 changes: 7 additions & 1 deletion packages/itwinui-css/src/tooltip/tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
text-align: center;
border-radius: var(--iui-border-radius-1);
font-size: var(--iui-font-size-0);
overflow: hidden;
overflow: visible;
max-inline-size: 400px;
inline-size: max-content;
overflow-wrap: break-word;
Expand All @@ -21,6 +21,12 @@
color: var(--iui-color-white);
border: 1px solid rgba(255, 255, 255, var(--iui-opacity-4));

&::before {
content: '';
position: absolute;
inset: -4px;
}

@include mixins.iui-blur($hsl: 0 0% 0%, $opacity: 3);

&:where([hidden], [popover]:not(:popover-open)) {
Expand Down

0 comments on commit 87bbc99

Please sign in to comment.