New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is the style attribute of an element removed when its associated property declaration block becomes empty? #2306
Comments
|
https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-interface says
Serializing an empty declarations is "", so you set Also see w3c/csswg-drafts#370 -- addressing that issue should make this clearer.
Seems like Chromium is the odd one out. |
Yeah, I think it would be better if all the algorithms that mutate a |
Anyway, given that this is already tracked elsewhere I think we can close this. Let me know if there are any remaining concerns. |
…t removing the style attribute. (#5392) This adds tests for whatwg/html#2306.
This makes us align with other browsers when, editing the style attribute, and also with the spec, per[1]: > Mutating the declarations must set the style content attribute on the context > object to the serialization of the declarations See also [2]. Note that this behavior also affects editing. I've just updated the editing tests. [1]: https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-interface [2]: whatwg/html#2306 BUG=686686 Review-Url: https://codereview.chromium.org/2800723002 Cr-Commit-Position: refs/heads/master@{#465181}
This kind of intersects between the HTML spec and CSSOM, so let me know which one is best to report it.
The following test case reports
true
in Firefox, andfalse
in chromium:The text was updated successfully, but these errors were encountered: