been messing with some old legacy layouts today. i've been trying to move away from those old padding-top hacks for aspect ratios because they're such a headache when you actually need the content to behave. using the modern aspect-ratio property is way cleaner, but it's driving me crazy when the source images aren't perfectly sized. if you don't pair it with object-fit: cover, you just get these stretched, ugly distortions that look terrible on high-density mobile screens.
.card-img {aspect-ratio: 16 / 9;object-fit: cover;}it's much easier than managing the old padding trick. at least until the browser decides to ignore your life's work. does anyone actually still use the padding hack for anything?