Re: [csswg-drafts] [css-sizing] Where does the default aspect-ratio of a <video> come from? (#12053)

```
<!DOCTYPE html>
<style>
video { width: 100px; background: lime; outline: dashed blue 2px; border: none; margin: 5px; }
</style>
<div>
  <video style="aspect-ratio: auto;"></video>
</div>
<div>
  <video style="aspect-ratio: 0;"></video>
</div>
<div>
  <video style="aspect-ratio: 1 auto;"></video>
</div>
```
Is a simple testcase for all the interesting cases.

Firefox (100x50, 100x150, 100x100) is doing part of Option (1) & part of Option (3) , Safari (100x50, 100x50, 100x100) appears to be doing Option (3).

I think the resolution in https://github.com/w3c/csswg-drafts/issues/7524#issuecomment-1204462924 is Option (1); however  none of the browsers who changed their behaviour actually did that :). We are happy to try for Option (1).

Option (1) would render the same as replacing `<video>` with `<svg>` in the above testcases. (100x150, 100x150, 100x100).

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


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

Received on Wednesday, 7 May 2025 18:22:32 UTC