Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/src/entities/post/ui/PostBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const PostBody = ({
dangerouslySetInnerHTML={{ __html: sanitizedHtml }}
suppressHydrationWarning
style={collapseStyles}
className="break-all [&_a]:break-all [&_img]:h-auto [&_img]:max-w-full"
className="break-all [&_a]:break-all [&_a]:text-blue-600 [&_a]:underline [&_img]:h-auto [&_img]:max-w-full"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

부모 Text 컴포넌트에 이미 break-all 클래스가 적용되어 있습니다. CSS의 word-break 속성은 자식 요소로 상속(inherit)되므로, 자식 a 태그에 개별적으로 [&_a]:break-all을 적용하는 것은 중복입니다. 이를 제거하여 코드를 더 간결하게 정리할 수 있습니다.

Suggested change
className="break-all [&_a]:break-all [&_a]:text-blue-600 [&_a]:underline [&_img]:h-auto [&_img]:max-w-full"
className="break-all [&_a]:text-blue-600 [&_a]:underline [&_img]:h-auto [&_img]:max-w-full"

/>
) : (
<Text
Expand Down
Loading