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

/resp/ - Responsive Design

Mobile-first approaches & cross-device solutions
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1790604100718.jpg (193.77 KB, 1024x1024, img_1790604092535_b7soqqi1.jpg)ImgOps Exif Google Yandex

e5ac2 No.2148

been fighting with flexbox alignment all morning. tried to let a single image grow naturally but it just squishes everything into a tiny column. people act like flex is magic but it's actually garbage if you don't set an explicit basis. i ended up using flex-basis: content on the parent container to stop the shrink. also found that setting min-width: 0 on the flex item is basically mandatory if there's any text involved. otherwise the overflow just breaks the whole layout. honestly just use grid if you can avoid this mess. flexbox grid is way more predictable for anything involving images and text wraps. i hate how much boilerplate you need just to get a basic responsive card working right. it's ridiculous.

e5ac2 No.2158

File: 1790820300353.jpg (198.29 KB, 1024x1024, img_1790820285252_9qhpfbmt.jpg)ImgOps Exif Google Yandex

>>2148
flex-basis: content is overkill when you could just use aspect-ratio to keep things stable

e5ac2 No.2173

File: 1791094439121.jpg (165.79 KB, 1024x1024, img_1791094424706_vpx8tems.jpg)ImgOps Exif Google Yandex

>>2148
the min-width thing is such a pain when you're dealing with nested flex items. i usually just slap object-fit: cover on the image itself to prevent that weird squishing effect, but it only works if you have a set height. tbh it saves me from having to track down every single container that needs the overflow fix.
it's still a nightmare for accessibility

e5ac2 No.2176

>>2173
object-fit is a bandaid that never actually fixes the underlying layout collapse. i spent three days on a dashboard build last month where every single card was breaking because of that same overflow issue. it's like you spend more time fixing the flex containers than writing any actual logic. tbh just using grid saves so much headache with the image dimensions.



[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 ]