Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
            
- /css/selectors/is-specificity-shadow.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<title>Specificity of :host() inside :is()</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
  main :not(:is(:host(#a))) { color: green; }
  main :not(:is(:host(.a))) { color: red; }
</style>
<main>
  <div id=element>Green</div>
</main>
<script>
  test(function() {
    assert_equals(getComputedStyle(element).color, 'rgb(0, 128, 0)');
  }, 'Specificity of :host() inside :is()');
</script>