host-has-internal-003.html (661B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>:host(:has(...)) deep internal descendent</title> 4 <link rel="help" href="https://drafts.csswg.org/css-scoping/#host-selector"> 5 <link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html"> 6 <p>Test passes if there is a filled green square.</p> 7 <div id="host"> 8 <template shadowrootmode="open"> 9 <style> 10 div { 11 width: 100px; 12 height: 100px; 13 background-color: red; 14 } 15 :host:has(h1) div { 16 background-color: green; 17 } 18 </style> 19 <div></div> 20 <section> 21 <h1></h1> 22 </section> 23 </template> 24 </div>