summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/cssom/cssstyledeclaration-csstext-important.html
blob: c12faf63a435903c908e8d0ecc6af5be94b8ab02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<title>CSSOM test: setting a property with cssText and !important</title>
<link rel="help" href="https://drafts.csswg.org/cssom-1/#dom-cssstyledeclaration-csstext">
<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>