Skip to content

Commit 5273011

Browse files
committed
fix(card): excerpt clamp respects 3 lines (drop flex-1 conflict with -webkit-box)
1 parent 339c2c3 commit 5273011

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

front/src/components/features/blog/PostCard.jsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,15 @@ export const PostCard = ({ post }) => {
6868
<span>{post.readingTime} min read</span>
6969
</div>
7070

71-
{/* Excerpt */}
72-
<p className="text-gray-600 dark:text-brand-fg-muted mb-4 line-clamp-3 leading-relaxed text-sm flex-1">
71+
{/* Excerpt — clean 3-line clamp (no flex-1; tags use mt-auto to anchor) */}
72+
<p
73+
className="text-gray-600 dark:text-brand-fg-muted mb-4 leading-relaxed text-sm overflow-hidden"
74+
style={{
75+
display: '-webkit-box',
76+
WebkitLineClamp: 3,
77+
WebkitBoxOrient: 'vertical',
78+
}}
79+
>
7380
{post.excerpt}
7481
</p>
7582

0 commit comments

Comments
 (0)