Commit 7bdb8873 authored by Alejandro Celaya's avatar Alejandro Celaya Committed by Alejandro Celaya

Fix word wrap in thread replies with very long words

parent 2112007f
...@@ -41,7 +41,7 @@ export default function MarkdownView({ ...@@ -41,7 +41,7 @@ export default function MarkdownView({
// some overflow calculations in the `Excerpt` element. This could be worth // some overflow calculations in the `Excerpt` element. This could be worth
// a review in the future. // a review in the future.
return ( return (
<div className="w-full break-words cursor-text"> <div className="w-full break-anywhere cursor-text">
<StyledText> <StyledText>
<div <div
className={classes} className={classes}
......
...@@ -171,7 +171,7 @@ function Thread({ thread, threadsService }: ThreadProps) { ...@@ -171,7 +171,7 @@ function Thread({ thread, threadsService }: ThreadProps) {
className={classnames( className={classnames(
// Set a max-width to ensure that annotation content does not exceed // Set a max-width to ensure that annotation content does not exceed
// the width of the container // the width of the container
'grow max-w-full' 'grow max-w-full min-w-0'
)} )}
data-testid="thread-content" data-testid="thread-content"
> >
......
...@@ -222,14 +222,18 @@ export default { ...@@ -222,14 +222,18 @@ export default {
addVariant('theme-clean', '.theme-clean &'); addVariant('theme-clean', '.theme-clean &');
}), }),
plugin(({ addComponents, addUtilities }) => { plugin(({ addComponents, addUtilities }) => {
// Tailwind does not provide hyphens-related utility classes.
addUtilities({ addUtilities({
// Tailwind does not provide hyphens-related utility classes.
'.hyphens-none': { '.hyphens-none': {
hyphens: 'none', hyphens: 'none',
}, },
'.hyphens-auto': { '.hyphens-auto': {
hyphens: 'auto', hyphens: 'auto',
}, },
// Tailwind does not provide this specific break utility: https://tailwindcss.com/docs/word-break
'.break-anywhere': {
'overflow-wrap': 'anywhere'
}
}); });
addComponents({ addComponents({
// Add a custom class to set all properties to initial values. Used // Add a custom class to set all properties to initial values. Used
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment