Open weinig opened 4 weeks ago
There are a few tests that require calc(NaN) and calc(infinity)/calc(-infinity) to be serialized as part of a color value.
For instance in css/css-color/parsing/color-valid-color-function.html:
test_valid_value("color", `color(${colorSpace} 0 calc(infinity) 0)`, `color(${colorSpace} 0 calc(infinity) 0)`);
and
test_valid_value("color", `color(${colorSpace} calc(NaN) 0 0)`, `color(${colorSpace} calc(NaN) 0 0)`);
From my reading of https://drafts.csswg.org/css-values/#calc-ieee, it seems like NaN and infinity should never "escape" top-level calculation, and should be censored to 0.
I am not entirely sure what "escape" means though, so I am not sure what is correct.
@tabatkins @fantasai , can one of you shed light on this?
This was also my understanding before this https://github.com/w3c/csswg-drafts/issues/8629#issuecomment-1480092533.
There are a few tests that require calc(NaN) and calc(infinity)/calc(-infinity) to be serialized as part of a color value.
For instance in css/css-color/parsing/color-valid-color-function.html:
and
From my reading of https://drafts.csswg.org/css-values/#calc-ieee, it seems like NaN and infinity should never "escape" top-level calculation, and should be censored to 0.
I am not entirely sure what "escape" means though, so I am not sure what is correct.
@tabatkins @fantasai , can one of you shed light on this?