diff options
Diffstat (limited to 'testing/web-platform/tests/css/selectors/is-specificity-shadow.html')
-rw-r--r-- | testing/web-platform/tests/css/selectors/is-specificity-shadow.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/selectors/is-specificity-shadow.html b/testing/web-platform/tests/css/selectors/is-specificity-shadow.html new file mode 100644 index 0000000000..af039955eb --- /dev/null +++ b/testing/web-platform/tests/css/selectors/is-specificity-shadow.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<title>Specificity of :host() inside :is()</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#matches"> +<link rel="help" href="https://drafts.csswg.org/css-scoping/#host-selector"> +<style> + main :not(:is(:host(#a))) { color: green; } + main :not(:is(:host(.a))) { color: red; } +</style> +<main> + <div id=element>Green</div> +</main> +<script> + test(function() { + assert_equals(getComputedStyle(element).color, 'rgb(0, 128, 0)'); + }, 'Specificity of :host() inside :is()'); +</script> |