Intent to prototype: CSS aspect-ratio in [css-sizing-4]

65 views
Skip to first unread message

Boris Chiou

unread,
May 20, 2020, 5:34:57 PM5/20/20
to dev-platform
*Summary*: 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. (Note: If a box has both a width and a height that are not
automatic, then the preferred aspect ratio has no effect.)
Example: A very simple case: if there is only a <div> with 'width: 100px'
and 'aspect-ratio: 1 / 1'. The automatic size of its height is 100px.

*Bug*: Bug 1528375 <https://bugzilla.mozilla.org/show_bug.cgi?id=1528375>
*Standard*: https://drafts.csswg.org/css-sizing-4/#aspect-ratio
*Platform coverage*: All platforms
*Preference*: layout.css.aspect-ratio.enabled (This is default off on all
channels. Only enabled for testing)
*DevTools bug*: N/A

*Other browsers*:
* Chromium issue 1045668
<https://bugs.chromium.org/p/chromium/issues/detail?id=1045668>: Chromium
has merged the implementation of aspect-ratio for basic blocks cases, for
experimental testing
* WebKit: not yet

*web-platform-tests*:
https://github.com/web-platform-tests/wpt/tree/master/css/css-sizing/aspect-ratio

-- Boris
Reply all
Reply to author
Forward
0 new messages