aspect-ratio
This property sets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions. 4.1. Intrinsic Aspect Ratios: the aspect-ratio property
Links about aspect-ratio
A First Look at `aspect-ratio` | CSS-Tricks
Oh hey! A brand new property that affects how a box is sized! That’s a big deal. There are lots of ways already to make an aspect-ratio sized box (and I’d
Designing An Aspect Ratio Unit For CSS — Smashing Magazine
What problems will the new aspect ratio unit solve? A look at the design of a new CSS feature.
Code sample
.box {
width: 400px;
height: auto;
aspect-ratio: 1/1;
}