Skip to content

Commit

Permalink
Make :has() unforgiving (#37391)
Browse files Browse the repository at this point in the history
  • Loading branch information
tabatkins authored Dec 8, 2022
1 parent 1d6b02f commit 41ee6a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion css/selectors/parsing/parse-has.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@
test_valid_selector('.a:has(.b):has(.c)');
test_valid_selector('*|*:has(*)', ':has(*)');
test_valid_selector(':has(*|*)', ':has(*)');
test_valid_selector('.a:has()', '.a:has()');
test_invalid_selector(':has');
test_invalid_selector('.a:has');
test_invalid_selector('.a:has b');
/* :has() is unforgiving, but :is() can still forgive */
test_invalid_selector(':has()');
test_invalid_selector(':has(123)');
test_invalid_selector(':has(.a, 123)');
test_valid_selector(':has(:is(.a, 123))', ':has(:is(.a))');
</script>

0 comments on commit 41ee6a1

Please sign in to comment.