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

[csswg-drafts] Pull Request: [cssom] Don't serialize shorthand if importance differs

From: Xidorn Quan via GitHub <sysbot+gh@w3.org>
Date: Mon, 09 Jan 2017 03:34:30 +0000
To: public-css-archive@w3.org
Message-ID: <pull_request.opened-100630389-1483932868-sysbot+gh@w3.org>
upsuper has just submitted a new pull request for 

== [cssom] Don't serialize shorthand if importance differs ==
For the following declarations:
div {
  background: green;
  background-image: none !important;
the current spec should return something for 
`getPropertyValue('background')`, but all browsers (even Servo) agree 
on that this should return nothing because the importance of its 
longhands differ.

This PR fixes this issue.

It can alternatively be fixed in "serialize a CSS value" algorithm. 
Given that the other callsite of this algorithm with a list (which is 
"serialize a CSS declaration block") already handles important flag 
itself, I guess it is better being put in `getPropertyValue` rather 
than "serialize a CSS value".

See https://github.com/w3c/csswg-drafts/pull/870
Received on Monday, 9 January 2017 03:34:36 UTC

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