- From: Emilio Cobos Álvarez via GitHub <sysbot+gh@w3.org>
- Date: Sun, 21 Jul 2024 02:27:24 +0000
- To: public-css-archive@w3.org
So, consider a `<video>`. If you just set `<video width=100 height=100>` that maps to `width: 100px; height: 100px; aspect-ratio: auto 100 / 100;`, so far so good. But if you override the width / height with CSS (setting them to e.g. auto, because let's say you're using it in a flex container or something else), that'd fall back to 300x150 (rather than what you'd expect which is stretching or what not). So in #7524 I made `<video>` not report an intrinsic size if it had an aspect-ratio, effectively. For `<img>`, you have the same issue, it's just that the fallback size is 0x0. Firefox treats it the same way as `<video>`, but Blink doesn't, and WebKit is doing something very weird too, which means that we get bug reports :) Falling back to 0x0 is not so terrible as 300x150, so I _think_ I'd be ok with such thing (even if a bit unfortunate / inconsistent). The main question is whether we go with the 0x0 (and I change Firefox and add a test), or with the no size behavior (and I close the bug as invalid and add a test). cc @jakearchibald too (since he filed #7524), and @Loirooriol since he was involved on some of those discussions. -- GitHub Notification of comment by emilio Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10605#issuecomment-2241391450 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 21 July 2024 02:27:25 UTC