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;
}
Explore other pages
- clamp()
Takes three calculations—a minimum value, a central value, and a maximum value
- list-style-type
Specifies a list item’s marker.
- writing-mode
Specifies whether lines of text are laid out horizontally or vertically and the direction in which blocks progress.
- aria-current
Indicates the current item within a set of related elements.