parse-slotted.html (1302B)
1 <!doctype html> 2 <meta charset="utf-8" /> 3 <title>CSS Selectors: slotted pseudo selectors</title> 4 <link rel="help" href="https://drafts.csswg.org/css-scoping/#slotted-pseudo" /> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <script src="/css/support/parsing-testcommon.js"></script> 8 <script> 9 test_valid_selector("::slotted(bar)"); 10 test_valid_selector('::slotted([attr="foo"])'); 11 test_valid_selector("::slotted(*)"); 12 test_valid_selector("::slotted(.class)"); 13 test_valid_selector("::slotted(:not(foo))"); 14 test_valid_selector('::slotted(:not(:nth-last-of-type(2)):not([slot="foo"]))'); 15 test_valid_selector("::slotted(:first-child)"); 16 test_valid_selector("::slotted(:hover)"); 17 test_valid_selector("::slotted(:has(:first-child:last-child))"); 18 test_invalid_selector("::slotted"); 19 test_invalid_selector("::slotted()"); 20 test_invalid_selector("::slotted(0)"); 21 test_invalid_selector(":slotted(foo)"); 22 test_invalid_selector("::slotted(foo):first-child"); 23 test_invalid_selector("::slotted(foo):hover"); 24 test_invalid_selector("::slotted(foo):focus"); 25 test_invalid_selector("::slotted(foo):lang(en)"); 26 test_invalid_selector("::slotted(foo):dir(ltr)"); 27 test_invalid_selector('::slotted(foo) + ::slotted(bar)'); 28 </script>