| <!doctype html> |
| <meta charset="utf-8"> |
| <title>:host combined with :not</title> |
| <link rel="help" href="https://drafts.csswg.org/selectors/#featureless"> |
| <link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html"> |
| <p>Test passes if there is a filled green square.</p> |
| <div id=host> |
| </div> |
| <script> |
| host.attachShadow({mode: "open"}).innerHTML = ` |
| <style> |
| :host { |
| width: 100px; |
| height: 100px; |
| background-color: green; |
| } |
| div:host { |
| background-color: red; |
| } |
| :not(div):host { |
| background-color: red; |
| } |
| :host:not(div) { |
| background-color: red; |
| } |
| :host:is(div) { |
| background-color: red; |
| } |
| :is(div):host { |
| background-color: red; |
| } |
| :host:not(:hover) { |
| background-color: red; |
| } |
| :host:not(:defined) { |
| background-color: red; |
| } |
| </style> |
| `; |
| |
| </script> |