W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2020

Re: [csswg-drafts] [css-sizing-4] Should aspect-ratio apply for width: auto; height: auto;? (#5060)

From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
Date: Fri, 15 May 2020 00:03:12 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-628948453-1589500991-sysbot+gh@w3.org>
Some relevant past issues & discussion:

Resolution in  https://github.com/w3c/csswg-drafts/issues/951#issuecomment-319718680 says “Replaced elements with only an intrinsic aspect ratio has a min-content size of 0” but see also #694 about clarifying the flexbox spec.

The current relevant spec text is in the [Flex Layout Algorithm](https://drafts.csswg.org/css-flexbox/#algo-main-item):

> If the flex item has ...
> - an intrinsic aspect ratio,
> - a used flex basis of content, and
> - a definite cross size,
> then the flex base size is calculated from its used inner cross size and the flex item’s intrinsic aspect ratio.

I _think_ if you follow all the linked definitions for terms, that says the Firefox behavior is correct. Note that the `stretch` value for align-items isn't relevant: because the cross-size is definite (a single-row flexbox with defined height), that gets used to determine the cross size of the box with an aspect ratio and no other size constraints.

GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5060#issuecomment-628948453 using your GitHub account
Received on Friday, 15 May 2020 00:04:41 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:06 UTC