ui(cards): object-contain on article-card images so portraits don't crop

Boxes stay sized; tall/odd-ratio images letterbox cleanly against the
existing slate card background instead of being chopped at the edges.
Applied to FeaturedBento, FeaturedBentoFromDb, ArticleFeed, NewsPageClient,
SpotlightCarousel, FeaturedCarousel, AISuggestedArticles, search/page.tsx.

Avatars (rounded-full) unchanged — still object-cover.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
ops-bot
2026-06-04 15:08:50 +00:00
parent bc49c676c3
commit e84f69f241
8 changed files with 11 additions and 11 deletions

View File

@@ -95,7 +95,7 @@ export default async function FeaturedBento() {
<img
src={img(hero)}
alt={hero.featured_image_alt || hero.title}
className="w-full h-full object-cover"
className="w-full h-full object-contain"
/>
<div className="absolute inset-0 bg-gradient-to-t from-black via-black/65 to-transparent" />
@@ -146,7 +146,7 @@ export default async function FeaturedBento() {
<img
src={img(r)}
alt={r.featured_image_alt || r.title}
className="w-full h-full object-cover"
className="w-full h-full object-contain"
/>
</div>
<div className="p-3 flex flex-col gap-1 flex-1 min-h-0 overflow-hidden">