Skip to content

Commit 362381f

Browse files
authored
fix(bug): remove overflow of comment (#206) (#207)
1 parent fc692cb commit 362381f

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

apps/web/src/styles/globals.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,17 @@
2525
width: 200%;
2626
height: 200%;
2727
}
28+
29+
@layer utilities {
30+
@supports not (overflow-wrap: anywhere) {
31+
.break-anywhere {
32+
word-break: break-word;
33+
}
34+
}
35+
36+
@supports (overflow-wrap: anywhere) {
37+
.break-anywhere {
38+
overflow-wrap: anywhere;
39+
}
40+
}
41+
}

apps/web/src/views/card/components/Comment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const Comment = ({
138138
<ContentEditable
139139
html={comment ?? ""}
140140
disabled={true}
141-
className="mt-2 text-sm"
141+
className="break-anywhere mt-2 text-sm"
142142
/>
143143
) : (
144144
<form onSubmit={handleSubmit(onSubmit)}>

apps/web/tailwind.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ export default {
1616
},
1717
},
1818
},
19-
} satisfies Config;
19+
} satisfies Config;

0 commit comments

Comments
 (0)