OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <script src="resources/shadow-dom.js"></script> |
| 4 <div id="sandbox"></div> |
| 5 <script> |
| 6 description("Inner scope !important rules wins, even with lower specificity."); |
| 7 |
| 8 sandbox.appendChild( |
| 9 createDOM('div', {'id': 'host'}, |
| 10 createShadowRoot( |
| 11 createDOM('style', {}, |
| 12 document.createTextNode( |
| 13 '::content span { color: green !important; }')), |
| 14 createDOM('content', {})), |
| 15 createDOM('style', {}, |
| 16 document.createTextNode( |
| 17 '#target { color: red !important; }')), |
| 18 createDOM('span', {'id': 'target'}))); |
| 19 |
| 20 shouldBeEqualToString("getComputedStyle(target).color", "rgb(0, 128, 0)"); |
| 21 </script> |
OLD | NEW |