still seeing devs use height: 100% or some weird calc instead of just setting aspect-ratio: 16 / 9. it's literally one line. i saw a ticket today where someone was trying to fix a jumping layout with a massive media query block and a bunch of padding-top hacks. it's so much cleaner to just let the browser handle the proportions. looks like they were using some old
legacy-css-library that doesn't even support modern properties properly. if you aren't using aspect-ratio for your card thumbnails, you're basically just making extra work for yourself. i hate seeing these massive files full of
margin-bottom: 56.25% nonsense. it makes the devtools nightmare even worse when you're trying to debug a simple flexbox issue.
img {width: 100%;aspect-ratio: 4 / 3;object-fit: cover;}tbh it's just lazy to keep doing the padding trick in 2024.