Skip to content

Commit 6ba736b

Browse files
authored
fix(Tag): overflow and width (#6316)
1 parent 1e4cc20 commit 6ba736b

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

.changeset/major-stars-crash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ultraviolet/ui": patch
3+
---
4+
5+
`Tag`: add a max width to ensure correct overflow

packages/ui/src/components/Popup/styles.css.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { theme } from '@ultraviolet/themes'
22
import { keyframes, styleVariants } from '@vanilla-extract/css'
33
import { recipe } from '@vanilla-extract/recipes'
44

5+
import { tagStyle } from '../Tag/styles.css'
56
import { tagListStyle } from '../TagList/styles.css'
67

78
import { DEFAULT_ARROW_WIDTH } from './helpers'
@@ -118,6 +119,10 @@ const childrenContainer = recipe({
118119
[`${tagListStyle.ellipsisChild} > &`]: {
119120
minWidth: 0,
120121
},
122+
[`&:has(${tagStyle.text})`]: {
123+
minWidth: 0,
124+
width: '100%',
125+
},
121126
},
122127
},
123128
variants: {

packages/ui/src/components/Tag/styles.css.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const container = recipe({
2323
padding: `0 ${theme.space[1]}`,
2424
whiteSpace: 'nowrap',
2525
width: 'fit-content',
26+
maxWidth: '100%',
2627
},
2728
variants: {
2829
copiable: {

0 commit comments

Comments
 (0)