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

> Would that also work for cases where the calculation result is IACVT or only for NaN? That would be quite useful for providing fallbacks for entire calculations without having to assign to a pointless variable.

It was just a random thought, and I didn't bother to dig into all the ramifications. At first blush, I'd expect it to operate like the fallback value on `var()`, e.g. any time the `calc()` fails to produce a value, use this instead. But that breaks the 'default the fallback value to 0' as all invalid `calc()`s would start turning in to 0s. So if we went this route I think we'd either have to either make it only apply to NaN, or make the fallback only default to 0 for a NaN (which seems weird) and a non-specified fallback would be invalid otherwise (tho a specified fallback would apply in either case).

-- 
GitHub Notification of comment by plinss
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7067#issuecomment-1104504893 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 22:09:10 UTC