Open emilio opened 6 years ago
cc @LeaVerou
The Working Group just discussed https://github.com/w3c/csswg-drafts/issues/2714
, and agreed to the following:
RESOLVED: always expand gradient syntax in serialization
@emilio wrote:
though then the algorithm to canonicalize them needs to be defined and tested.
Does that still need to be defined, before the edits to gradient serialization are made?
I made some suggestions for the one-stop case
Current behavior is:
I'd expect that behavior to be preserved in presence of the double-position stop syntax, but right now in Blink's implementation that returns:
I think defining how gradients serialize in presence of this syntax is worth doing before implementations ships this.
There would be three options IIUC:
Keep the gradient as-specified.
This would be the nicest IMO, since it doesn't break old code and allows the new syntax.
Canonicalize gradients if possible.
This is what Blink does. This would be OK if we deem the compact impact is not relevant / enough, though then the algorithm to canonicalize them needs to be defined and tested.
Never canonicalize gradients.
All gradients would serialize with the "expanded" syntax. I'd be ok-ish with this, though it may not be that great.