Re: [csswg-drafts] [css-values] Make top-level NaN be invalid at computed value time instead of ∞ (#7067)

In general, I'd prefer some kind of behavior that makes a NaN `calc()` invalid so that regular fallback can happen, but I accept that may not be doable with `calc()`.

I'm OK with 0 instead of infinity (infinity really bothers me because it completely different behavior for NaN than used anywhere else), but also had a thought about providing an optional fallback within the `calc()` itself, e.g. `calc(--foo / --bar, 0)` where the default value of the fallback would be 0. This would allow authors who know what they're doing (and understand that NaN can happen to their `calc()` provide the fallback that makes the most sense for their situation.

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


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

Received on Wednesday, 20 April 2022 17:08:38 UTC