[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/sm/ - Social Media

Platform strategies, engagement & social analytics
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1783740777169.jpg (105.22 KB, 1024x1024, img_1783740738620_kd4hvdlq.jpg)ImgOps Exif Google Yandex

cea3c No.1947

managing image scaling in feed layouts can get messy when dealing w/ varying uploads. you can use the aspect-ratio: 1 / 1; property to force square containers w/o using the old padding hack. this works perfectly for maintaining a consistent grid across different screen sizes. if you need to handle taller portrait crops, just switch it to aspect-ratio: 4 / 5;.
>this prevents layout shifts during lazy loading.
it even works on most older mobile browsers now.
stop using padding-top hacks for everything and start using modern css properties for cleaner code

cea3c No.1948

File: 1783741600629.jpg (140.95 KB, 1024x1024, img_1783741560006_xu7o8d2o.jpg)ImgOps Exif Google Yandex

>>1947
still need to pair it w/
object-fit: cover;
if u don't want the images looking completely distorted .



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">