grain.social is a photo sharing platform built on atproto. grain.social
atproto photography appview
57
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: center carousel images whenever aspect ratios differ

Remove the 1.3x threshold and trigger centering for any mixed
aspect ratios, so shorter landscape images always center vertically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+2 -3
+2 -3
app/lib/components/molecules/GalleryCard.svelte
··· 76 76 77 77 const hasPortrait = $derived(photos.some((p) => photoRatio(p) < 1)) 78 78 const ratios = $derived(photos.map(photoRatio)) 79 - const hasMixedRatios = $derived( 80 - photos.length > 1 && ratios.length > 0 && Math.max(...ratios) / Math.min(...ratios) > 1.3 79 + const needsFixedHeight = $derived( 80 + photos.length > 1 && new Set(ratios.map((r) => r.toFixed(2))).size > 1 81 81 ) 82 - const needsFixedHeight = $derived(hasPortrait || hasMixedRatios) 83 82 const minRatio = $derived( 84 83 photos.length > 0 ? Math.max(Math.min(...ratios), hasPortrait ? 0.56 : Math.min(...ratios)) : 1 85 84 )