slotted-has-002.html (689B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <link rel="help" href="https://github.com/w3c/csswg-drafts/pull/10586"> 4 <link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html"> 5 <p>Test passes if there is a filled green square.</p> 6 <div id="host"> 7 <template shadowrootmode="open"> 8 <style> 9 slot { 10 display: block; 11 width: 100px; 12 height: 100px; 13 background-color: red; 14 } 15 ::slotted(:has(:last-child)) { 16 display: block; 17 width: 100px; 18 height: 100px; 19 background-color: green; 20 } 21 </style> 22 <slot></slot> 23 </template> 24 <div><div></div></div> 25 </div>