Add minWidth: 0 to one line text
This commit is contained in:
@@ -108,6 +108,10 @@ export function P({style, ...rest}: TextProps) {
|
|||||||
const numberOfLinesClippingFix = {
|
const numberOfLinesClippingFix = {
|
||||||
overflowY: 'visible',
|
overflowY: 'visible',
|
||||||
overflowX: 'clip',
|
overflowX: 'clip',
|
||||||
|
// mimic browser default behavior of `min-width: 0` on `overflow: hidden`
|
||||||
|
// elements to allow text to shrink smaller than its intrinsic width when
|
||||||
|
// necessary
|
||||||
|
minWidth: 0,
|
||||||
// this is neater and supports vertical writing modes, but it's only baseline newly available
|
// this is neater and supports vertical writing modes, but it's only baseline newly available
|
||||||
// overflowInline: 'clip',
|
// overflowInline: 'clip',
|
||||||
} satisfies React.CSSProperties as TextStyleProp
|
} satisfies React.CSSProperties as TextStyleProp
|
||||||
|
|||||||
Reference in New Issue
Block a user