W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2021

Re: [csswg-drafts] [css-sizing] aspect-ratio elements can have conflicting min-content sizes (#6418)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Thu, 15 Jul 2021 21:22:16 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-881021984-1626384135-sysbot+gh@w3.org>
You're right - the text in "min-content" is (and has been for a long time) a rough conceptual gloss of the behavior; the text in "intrinsic sizes" is the actual technical definition. Your reading of it is right; the min-content size is 50px, since that's the size you'd get if you applied `min-width: 0; width: auto; max-width: none;` and then floated it in a zero-width container. (The aspect-ratio would transfer the height:100px across to resolve the automatic width.)

However, in most cases the element will still end up being 100px wide due to the automatic minimum width, since the inline axis is the ratio-dependent axis and thus <https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum> applies to prevent possibly-unintentional overflow.

Chrome and Firefox (we haven't tested others) already have exactly this behavior, so hopefully this is fine?

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6418#issuecomment-881021984 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 15 July 2021 21:22:18 UTC

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