Skip to content

Commit e780f82

Browse files
fix(tooltip): force label wrapping (#5878)
1 parent 0f9feba commit e780f82

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/real-corners-cross.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@spectrum-web-components/tooltip': patch
3+
---
4+
5+
**Fixed**: Fixed an issue with text overflow in `sp-tooltip`: long, unbroken words were not wrapping and overflowed the container.

1st-gen/packages/tooltip/src/spectrum-tooltip.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@
321321
line-height: var(--mod-tooltip-line-height, var(--spectrum-tooltip-line-height));
322322
margin-block-start: var(--mod-tooltip-spacing-block-start, var(--spectrum-tooltip-spacing-block-start));
323323
margin-block-end: var(--mod-tooltip-spacing-block-end, var(--spectrum-tooltip-spacing-block-end));
324+
325+
/* Allow overflow-wrap to work and prevent text overflow */
326+
inline-size: 100%;
327+
min-inline-size: 0;
324328
}
325329

326330
#tooltip,

0 commit comments

Comments
 (0)