Skip to content

Commit

Permalink
Fix false positives for part pseudo-element in selector-pseudo-elemen…
Browse files Browse the repository at this point in the history
…t-no-unknown (#4604)

Fixes #4589
  • Loading branch information
bennypowers committed Feb 16, 2020
1 parent d5a9ccf commit 4e1042b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/reference/keywordSets.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ keywordSets.levelThreePseudoElements = new Set([
'content',
]);

keywordSets.shadowTreePseudoElements = new Set(['part']);

keywordSets.vendorSpecificPseudoElements = new Set([
'-moz-progress-bar',
'-moz-range-progress',
Expand Down Expand Up @@ -202,6 +204,7 @@ keywordSets.pseudoElements = uniteSets(
keywordSets.levelOneAndTwoPseudoElements,
keywordSets.levelThreePseudoElements,
keywordSets.vendorSpecificPseudoElements,
keywordSets.shadowTreePseudoElements,
);

keywordSets.aNPlusBNotationPseudoClasses = new Set([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ testRule(rule, {
code: 'html { --custom-property-set: {} }',
description: 'custom property set in selector',
},
{
code: 'a::part(shadow-part) { }',
},
],

reject: [
Expand Down

0 comments on commit 4e1042b

Please sign in to comment.