Re: [csswg-drafts] [css-easing] Should we include the infinity for output progress value? (#8344)

> We could make infinite values result in an invalid linear()?

Can't do "invalid", since it's not always detectable at parse time.

But yeah, as Oriol said calculations don't actually resolve to infinite values; they're clamped to *something* large (but undefined) by definition. So no, a linear() can't actually resolve to an infinite value.

(A given context *could* define that infinite values are allowed and so something specific with them, but none do currently, and we probably shouldn't without a great reason. In particular, doing anything different from "very large but finite" is probably a bad idea, and if you *are* consistent with "very large but finite", just relying on the implicit clamping is probably sufficient anyway.)

> I guess [drafts.csswg.org/css-values-4/#calc-computed-value](https://drafts.csswg.org/css-values-4/#calc-computed-value) doesn't quite specify what's the actual computed value of a `<number>` that happens to be calc(infinity), but it's weird that it would just be FLOAT_MAX effectively.

Yeah, the lack of a specified max is intentional; the actual value doesn't actually matter (any similarly-enormous number will do effectively the same thing in whatever context it appears in), and actually setting values would require a lot of extra research and specification effort. Just wasn't worth the cost for whatever minimal benefit consistency would bring us.

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


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

Received on Monday, 23 January 2023 20:16:04 UTC