Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<title>CSSOM test: setting a property with cssText and !important</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="box"></div>
<script>
var style = document.getElementById('box').style;
test(function(){
style.cssText = "padding: 10px !important; padding-left: 20px;";
assert_equals(style.getPropertyValue("padding-left"), "10px");
}, "padding-left should be taken from the !important property");
</script>