frontend

Replacing padding workarounds with aspect-ratio

The CSS aspect-ratio property is one of those additions that makes an old workaround feel particularly awkward. Expressing the intended proportions directly is much easier to read than a padding calculation.

I'd still check the browsers a project needs before relying on it. But it's a good reminder to revisit familiar snippets occasionally. The way I learned to solve a layout problem doesn't have to remain the way I solve it forever.