Re: [csswg-drafts] [css-sizing-4] How to handle 0 in aspect-ratio (#5557)

It doesn't say how to handle it because there's nothing special to do with it - it acts exactly like you'd expect, similar to values close to it. That is, `0/x` acts similar to `0.000000001/x`, and same for `x/0`. Nothing wrong with zeros or infinities here; they're the same as very-small nonzero values or very-large finite values.

> Why did you not make it compute to auto?

They don't compute to auto because it would violate our 'no open ranges' restriction (giving a substantially different behavior between `0` and `.000000000001`, potentially exposing UA-specific rounding). Also, there's no reason to, since the behavior at 0 has a simple, clean definition as the limit behavior of it approaching zero.

> (Also, I don't recall this entire change being discussed in the WG?)

It's just a side-effect of us changing ratios from `<integer>` to `<number>`, which we did discuss. I'd have to dig up the issue, but it was definitely discussed in a f2f as well. When it was `<integer>` we could disallow zero, but as soon as you allow numbers, you have to allow zero because of no-open-ranges.

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


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

Received on Tuesday, 29 September 2020 16:51:42 UTC