Re: [csswg-drafts] [css-sizing-4] Expected size of replaced element with aspect-ratio but width/height auto (#5721)

> It's not quite clear. I think it probably needs to say

Ah yeah, that clarification makes sense.

> So to clarify, since there is no explicit size here by definition, we will always compute the block size from the inline size?

Yeah. 

1. No explicit sizes means it uses the automatic sizes of the element.
2. For replaced elements the automatic sizes are the natural sizes.
3. When 'aspect-ratio' is in play the automatic size in the ratio-dependent axis is instead calculated from the size in the ratio-determining axis + aspect-ratio
4. Since both 'width' and 'height' are using automatic sizes, the ratio-dependent axis is the block axis by default.

So the image in the original post will use its natural width, and then its height will be the same as its width, to make it square.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 20 January 2021 17:44:48 UTC