[csswg-drafts] [cssom] Declaration block serialization treats shorthands strangely

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

== [cssom] Declaration block serialization treats shorthands strangely ==
The shorthand loop when [serializing a declaration block](https://drafts.csswg.org/cssom/#serialize-a-css-declaration-block) has two odd parts to it:
* it refers to the `longhands` array which consists of properties that have not yet been serialized, but that array is only defined before the start of the loop. As written, it's not clear if step 1 of the shorthand loop is supposed to account for properties serialized in previous iterations of the shorthand loop. 
* it's also not clear why it's worth continuing to execute subsequent iterations of the shorthand loop if a shorthand is successfully serialized. Given that shorthands are organized in [preferred order](https://drafts.csswg.org/cssom/#concept-shorthands-preferred-order), why would we end up serializing a less-preferred shorthand if a more-preferred one was already used?

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

Received on Friday, 1 September 2017 20:24:22 UTC