Skip to content

Commit

Permalink
Fix Truncate component for long unbreakable text. (#61137)
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia committed May 9, 2024
1 parent dbd6bda commit 78e53bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/src/truncate/hook.ts
Expand Up @@ -57,7 +57,7 @@ export default function useTruncate(
// breaks even when it contains 'unbreakable' content such as long URLs.
// See https://github.com/WordPress/gutenberg/issues/60860.
const truncateLines = css`
word-break: break-all;
${ numberOfLines === 1 ? 'word-break: break-all;' : '' }
-webkit-box-orient: vertical;
-webkit-line-clamp: ${ numberOfLines };
display: -webkit-box;
Expand Down

0 comments on commit 78e53bb

Please sign in to comment.