Move color to the beginning rather than the end of the last layer in background shorthand serialization
Categories
(Core :: CSS Parsing and Computation, task, P2)
Tracking
()
People
(Reporter: emilio, Unassigned)
References
Details
This would effectively undo bug 743392. We didn't do this in bug 1134171, but WebKit / Blink do it, and after checking the spec more carefully, <final-bg-layer> has the <background-color> before rather than after (https://drafts.csswg.org/css-backgrounds/#typedef-final-bg-layer), so I think WebKit and Blink follow the spec and we're wrong.
Connor, would you be interested in taking it? Otherwise I can, we should probably fix it in the same release as bug 1134171 to avoid changing behavior too many times.
Thanks!
Comment 1•3 years ago
|
||
Hey Emilio, I could pick this one up. Could you help me understand the issue though? My understanding is that Firefox already serializes <background-color> in the beginning, while Blink puts it at the end.
For example given the following snippet, Chrome prints url("/favicon.ico") white and Firefox (nightly) prints white url("/favicon.ico").
const el = document.createElement('div');
el.style = 'background: url(/favicon.ico) white;';
console.log(el.style.background);
Is there a case where <background-color> is not serialized first that we need to fix? Or should we move it to the end to match Chrome?
Thanks!
| Reporter | ||
Comment 2•3 years ago
|
||
Err, d'oh, I think I just messed up our order vs. the other browsers', I needed a coffee :)
Description
•