Open weinig opened 3 months ago
cc @svgeesus, @LeaVerou
Thanks @weinig both for the suggested wording and also especially for the set of worked examples!
The text states it should use the "un-normalized" values. The value of 60% would only be discovered during the normalization (specifically, step 4)).
This is true.
Because this section evolved over time, I think that my mental model was whether a number had changed, like color-mix(in oklab, red 75%, blue 150%)
becoming 33.33%
and 66.67%
respectively; and I originally wrote that those modified values would be the ones serialized. But then there were problems, like knowing if they had originally added to less than 100%, so we went for the un-normalized
wording without noticing that unspecified values only get a value during normalization.
Your suggested wording is much better.
@emilio @kbabbitt @nt1m are we good with these suggested changes? And if so we should be get a WG resolution.
@emilio @kbabbitt @nt1m it would be great to get any concerns logged here, before TPAC, so that we can get a quick resolution to adopt the wording from @weinig and also get the examples into WPT tests.
I trust @weinig :)
@weinig @svgeesus
Thanks for the writeup and the ping. I looked at the proposed text and existing test cases in color-valid-color-mix-function.html. Am I understanding correctly that the changes would only clarify the existing behavior and not introduce any changes to expected serializations? If that's the case, I'm happy with the new wording.
If there are behavior changes in the wording that I missed, could you please point them out?
Am I understanding correctly that the changes would only clarify the existing behavior and not introduce any changes to expected serializations?
Exactly.
@astearns it seems consensus is being reached, and also this issue is on the TPAC overflow area so unlikely to be discussed.
Suggested async resolution: Adopt the suggested wording from @weinig regarding color-mix()
edge cases
This sounds good to me too fwiw, sorry for the lag.
The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.
Proposed Resolution: Adopt the color-mix()
serialization suggestions from @weinig
RESOLVED: Adopt the color-mix()
serialization suggestions from @weinig
The current text for serializing
color-mix()
states:Directly after that, in example 43, the first example seems to contradict this:
The text states it should use the "un-normalized" values. The value of 60% would only be discovered during the normalization (specifically, step 4)).
So it seems like we need a slightly more complicated serialization rule. The following wording needs work, but I think mostly gets to the intent:
(to make this somewhat easier to grok, below is a pretty comprehensive list of specified value serializations with a comment to the right explaining which rules it is used for each percentage).