Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-scoping/host-in-host-context-selector.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Scoping: :host-context(: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-context(:host) {
--x:FAIL;
}
</style>
</template>
</div>
<script>
test(() => {
assert_equals(getComputedStyle(host).getPropertyValue('--x'), '');
});
</script>