is-specificity-shadow.html (627B)
1 <!DOCTYPE html> 2 <title>Specificity of :host() inside :is()</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <link rel="help" href="https://drafts.csswg.org/selectors-4/#matches"> 6 <link rel="help" href="https://drafts.csswg.org/css-scoping/#host-selector"> 7 <style> 8 main :not(:is(:host(#a))) { color: green; } 9 main :not(:is(:host(.a))) { color: red; } 10 </style> 11 <main> 12 <div id=element>Green</div> 13 </main> 14 <script> 15 test(function() { 16 assert_equals(getComputedStyle(element).color, 'rgb(0, 128, 0)'); 17 }, 'Specificity of :host() inside :is()'); 18 </script>