Re: [csswg-drafts] [css-images] Behaviour of SVG degenerate aspect-ratios (#6286)

@fantasai - We resolved on this https://github.com/w3c/csswg-drafts/issues/11236#issuecomment-2718502765
> RESOLVED: for the final step in determining natural sizes, use the determined aspect-ratio to coerce the block size to match

Note there is a difference between:
`<svg width="0px" height="20px" viewBox="0 0 50 100"></svg>`
`<svg width="-1px" height="20px" viewBox="0 0 50 100"></svg>`

"Zero" is a perfectly valid natural-size for a replaced elements (lots of web-developers use this).

In the above cases the aspect-ratio is both 50x100, however there is a difference in the natural size.

The 1st has: "0x0" as zero reflected through the aspect-ratio is zero. 0x0 is valid as a natural-size.
The 2nd has: "10x20" as "-1px" is not a valid intrinsic size.

Ian



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


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

Received on Monday, 18 August 2025 18:22:48 UTC