Re: [csswg-drafts] [css-sizing] Import aspect-ratio from child image (#5269)

Strong agree with this - in particular, it would be *very* useful to let `<picture>` pick up the aspect ratio of the chosen source for its child `img`.

So I guess this should only work if it contains only a *single* child box (this works for `picture`, which only contains display:none `source` elements and one `img`). Multiple boxes don't make sense here; what possible relevance could the aspect-ratio of one of them have if you have more content that is thus, by definition, making the content not be that aspect-ratio?

Should mbp of the child matter? A 4:3 `img` child with `margin: 10px;` won't be exactly 4:3 anymore - do we want the `picture` to still be 4:3 or be whatever the resulting aspect-ratio is when you inflate the box by 10px?


Agenda+ to introduce the subject and spark discussion/thought; not looking for a final solution here yet.

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

Received on Monday, 20 July 2020 23:37:13 UTC