Re: [csswg-drafts] [mediaqueries] Define `aspect-ratio` with `<number> [/ <number]?` instead of `<ratio>` (#10906)

Worth noting that we interpolate ratios in a way that only makes sense for non-negative ratios.

For example, the intermediate ratio between two ratios is their [geometric mean](https://en.wikipedia.org/wiki/Geometric_mean), which is defined for non-negative numbers.

But I guess we could say that ratios can only be interpolated if they have the same sign (and aren't degenerate), then if both are negative we interpolate the absolute values and multiply the result by -1.

Alternatively, I guess `<ratio>` could be a generic pair of numbers and interpolate them independently, and then restrict `aspect-ratio` to non-negative ratios, and set the current interpolation behavior as the interpolation type of the property.

I'm not sure it's worth doing, though.

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


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

Received on Tuesday, 17 September 2024 16:07:47 UTC