Skip to content

Commit 324e588

Browse files
authored
fix(blog): use object-cover so card and detail covers fill the frame (#558)
The earlier switch to object-contain was meant to preserve the full image, but it left dark letterbox bands around banners on both the BlogCard grid and the post-details hero. With properly-sized cover banners, object-cover fills the frame without visible cropping. Authors should size cover images for a 2:1 ratio on the card and the responsive heights on the details page.
1 parent 54c36bf commit 324e588

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

components/landing-page/blog/BlogCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const BlogCard = ({ post, onCardClick }: BlogCardProps) => {
2424
src={post.coverImage}
2525
alt={post.title}
2626
fill
27-
className='object-contain transition-transform duration-500 group-hover:scale-105'
27+
className='object-cover transition-transform duration-500 group-hover:scale-105'
2828
sizes='(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw'
2929
/>
3030
{/* Gradient Overlay */}

components/landing-page/blog/BlogPostDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const BlogPostDetails: React.FC<BlogPostDetailsProps> = ({
140140
src={post.coverImage}
141141
alt={post.title}
142142
fill
143-
className='rounded-lg object-contain'
143+
className='rounded-lg object-cover'
144144
priority
145145
sizes='(max-width: 768px) 100vw, (max-width: 1200px) 80vw, 70vw'
146146
/>

0 commit comments

Comments
 (0)