Normally, only certain replaced elements have an aspect ratio, particularly images. For them, if only one of width and height is specified, the other can be computed from it using the intrinsic aspect ratio. This property allows explicitly specifying an aspect ratio for any other element to get similar behavior.
Generalizes the aspect ratio concept to general elements. This allows various effects, for example sizing <iframe> elements using an aspect ratio, things like filmstrips where each element has the same height but needs an appropriate width, cases where a replaced element is wrapped by a component but should keep the aspect ratio, etc.
Status in Chromium
Enabled by default (tracking bug) in:
- Chrome for desktop release 88
- Chrome for Android release 88
- Android WebView release 88
Consensus & Standardization
Intent to Prototype urlIntent to Prototype thread
Search tagsaspect-ratio, aspect, ratio,
Last updated on 2021-01-20