[csswg-drafts] [css-color-4] Computed value and serialization of `Infinity` and `NaN` in color functions (#8629)

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

== [css-color-4] Computed value and serialization of `Infinity` and `NaN` in color functions ==
What are the expected values and serializations for these examples?

- `lab(calc(Infinity) 0 0)`
- `lab(50% calc(Infinity) 0)`
- `lab(calc(NaN) 0 0)`
- `lab(50% calc(NaN) 0)`
- ...

_manually setting these values seems illogical but they can be the result of calculations and variables. e.g. `calc(var(--foo) / var(--bar))` where `--bar` is possibly zero.

------

Currently browsers do very different things in some area's.

Chrome and Safari seem to agree that `lab(50% calc(Infinity) 0)` serializes as `lab(50% Infinity 0)`, but that no longer roundtrips because the [required `calc`](https://www.w3.org/TR/css-values-4/#calc-serialize) was removed.

Chrome renders `lab(50% calc(Infinity) 0)` as white.
Safari renders `lab(50% calc(Infinity) 0)` as black.

WPT doesn't have any tests for these kinds of values. 

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


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

Received on Tuesday, 21 March 2023 22:23:32 UTC