-
Notifications
You must be signed in to change notification settings - Fork 756
Description
The specified order of declarations define that shorthand properties [are] expanded into their longhand properties, in canonical order, and a general principle of serialization is that if certain component values can appear in any order without changing the meaning of the value (a pattern typically represented by a double bar || in the value syntax), reorder the component values to use the canonical order of component values as given in the property definition table.
When setting background to a single <final-bg-layer>, Chrome serializes the component values in the order derived from <bg-layer> and append <bg-color> at the end, while Firefox serializes in another order.
style.background = 'url("bg.jpg") left 10% / 100px 100% no-repeat fixed content-box padding-box red'
console.log(style.background)
// Chrome: same as input
// Firefox: red url("bg.jpg") no-repeat fixed left 10% / 100px 100% content-box padding-boxThe motivation of this request is two fold. It would be also handy to be able to extract a list of shorthands from eg. w3c/webref (see #2921). Using this tool, I can extract a list of shorthands by searching for individual or shorthand in the initial or computed value fields, but there are some inconsistencies between specifications and I'm not sure that this method is 100% accurate.
Therefore a new definition field value, eg. shorthand for, would answer both parts of this request.
Related: #5741.