Skip to content

Conversation

@upsuper
Copy link
Member

@upsuper upsuper commented Jan 9, 2017

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".

@upsuper upsuper added the cssom-1 Current Work label Jan 9, 2017
@FremyCompany
Copy link
Contributor

That makes sense to me.

@zcorpan
Copy link
Contributor

zcorpan commented Jan 10, 2017

Thanks, looks good. Do you have a test case you can submit to web-platform-tests or csswg-test also? :-)

@zcorpan zcorpan merged commit 7f81e13 into w3c:master Jan 10, 2017
@upsuper upsuper deleted the shorthand-importance branch January 10, 2017 23:40
@upsuper
Copy link
Member Author

upsuper commented Jan 10, 2017

There already exists a web-platform test covers this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cssom-1 Current Work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants