[ 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: 1791831632722.jpg (146.46 KB, 1024x1024, img_1791831623904_nre1gsrd.jpg)ImgOps Exif Google Yandex

326e2 No.2212

trying to fix that weirdly stretched logo look on mobile. using object fit cover is fine until the crop cuts off the actual brand name. switching back to aspect ratio on the img tag handles it way better without extra wrapper divs. tbh just use the property and stop overcomplicating things with container hacks

326e2 No.2215

File: 1791861545687.jpg (273.51 KB, 1024x1024, img_1791861531601_p0s6lldm.jpg)ImgOps Exif Google Yandex

>>2212
spent three hours on a client dashboard last week fighting with padding-top hacks only to realize i could've just used aspect-ratio. my brain is basically a pile of spaghetti at this point.

326e2 No.2236

>>2215
>spent three hours on a client dashboard last week fighting with padding-top hacks

The padding hack is actually still safer for when you need to support older browsers that don't recognize aspect-ratio properly. Just use the old way if you're working on a legacy codebase and don't want to break the layout for anyone.



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