[csswg-drafts] [color-5] Serialization of percentages in color-mix() (#8564)

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

== [color-5] Serialization of percentages in color-mix() ==
In reference to this section:
https://github.com/w3c/csswg-drafts/blob/43b12e47663cff4cead0d187086dcf9ea8f33626/css-color-5/Overview.bs#L2585

The spec doesn't mention anything about serializing the incoming color-mix(), only the result.  For color-mix() itself the tests suggest that the percentages on both sides should only be omitted if the author omitted them, otherwise they should be present.

@emilio mentioned that there is also the [serializing-css-values](https://drafts.csswg.org/cssom/#serializing-css-values) section that suggests the percentages could be omitted if they are obvious.

So for example `color-mix(in hsl, red 60%, blue 40%)` should serialize to `color-mix(in hsl, red 60%, blue)`.  This contradicts what is currently in the tests.

As all other browsers (except firefox) is following the current wpt tests, I think we should maybe explicitly mention this in the spec?

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


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

Received on Sunday, 12 March 2023 11:55:59 UTC