Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-scoping/host-in-host-selector.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Scoping: :host(:host)</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="host">
<template shadowrootmode="open">
<style>
/* Should not match */
:host(:host) {
--x:FAIL;
}
</style>
</template>
</div>
<script>
test(() => {
assert_equals(getComputedStyle(host).getPropertyValue('--x'), '');
});
</script>