W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2017

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

From: Josh Matthews via GitHub <sysbot+gh@w3.org>
Date: Fri, 01 Sep 2017 20:24:26 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-254743071-1504297457-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:17 UTC