[csswg-drafts] [css-values] Make top-level NaN be IACVT instead of ∞ (#7067)

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-values] Make top-level NaN be IACVT instead of ∞ ==
From https://drafts.csswg.org/css-values/#top-level-calculation

> If a top-level calculation [...] would produce a value whose numeric part is NaN, it instead act as though the numeric part is +∞.

This seems very random to me, why ∞ instead of e.g. -∞, 0, 1, or 3.14159?

This topic was already touched in #4954. @LeaVerou said

> I don't understand the sentence "it produces a NaN, which is censored into an infinity". Mathematically, 0/0 does not tend to infinity and is an indeterminate form.
> It seems more reasonable that it would be invalid at computed value time, or something along these lines.

And during the CSSWG discussion:

> - oriol: One argument about this, maybe we could say that saying the initial value is not possible, but we could resolve it to NaN and keep NaN into the outer calc, then bubble it up, and say if the number resolves to NaN it behaves as the initial value.
> - TabAtkins: If a top-level calculation ends up being NaN, the property would be invalid at computed value time. It's possible.

But AFAIK the discussion didn't continue.

I do think that invalid at computed value time seems more reasonable than ∞.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7067 using your GitHub account


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

Received on Thursday, 17 February 2022 00:27:01 UTC