Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix false positives/negatives in selector-pseudo-class-no-unknown #5956

Merged
merged 2 commits into from Mar 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 17 additions & 6 deletions lib/reference/keywordSets.js
Expand Up @@ -179,6 +179,8 @@ keywordSets.shadowTreePseudoElements = new Set(['part']);

keywordSets.vendorSpecificPseudoElements = new Set([
'-moz-focus-inner',
'-moz-focus-outer',
'-moz-placeholder',
'-moz-progress-bar',
'-moz-range-progress',
'-moz-range-thumb',
Expand All @@ -197,6 +199,7 @@ keywordSets.vendorSpecificPseudoElements = new Set([
'-ms-tooltip',
'-ms-track',
'-ms-value',
'-webkit-input-placeholder',
'-webkit-progress-bar',
'-webkit-progress-value',
'-webkit-slider-runnable-track',
Expand Down Expand Up @@ -231,11 +234,6 @@ keywordSets.otherPseudoClasses = new Set([
'autofill',
'blank',
'checked',
/*
https://www.w3.org/Style/CSS/Test/CSS3/Selectors/20011105/html/tests/css3-modsel-85.html
https://www.w3.org/Style/CSS/Test/CSS3/Selectors/20011105/html/tests/css3-modsel-84.html
*/
'contains',
'current',
'default',
'defined',
Expand All @@ -256,7 +254,6 @@ keywordSets.otherPseudoClasses = new Set([
'hover',
'indeterminate',
'in-range',
'invalid',
ybiquitous marked this conversation as resolved.
Show resolved Hide resolved
'last-child',
'last-of-type',
'link',
Expand All @@ -277,10 +274,21 @@ keywordSets.otherPseudoClasses = new Set([
'target',
'user-error',
Mouvedia marked this conversation as resolved.
Show resolved Hide resolved
'user-invalid',
'user-valid',
'invalid',
'valid',
'visited',
]);

keywordSets.vendorSpecificPseudoClasses = new Set([
'-moz-placeholder',
'-moz-ui-invalid',
'-moz-ui-valid',
'-ms-input-placeholder',
]);

// TODO migrate to vendorSpecificPseudoElements
// see #2264
keywordSets.webkitProprietaryPseudoElements = new Set([
'scrollbar',
'scrollbar-button',
Expand All @@ -291,6 +299,8 @@ keywordSets.webkitProprietaryPseudoElements = new Set([
'resize',
]);

// TODO migrate to vendorSpecificPseudoClasses
// see #2264
keywordSets.webkitProprietaryPseudoClasses = new Set([
'horizontal',
'vertical',
Expand All @@ -311,6 +321,7 @@ keywordSets.pseudoClasses = uniteSets(
keywordSets.logicalCombinationsPseudoClasses,
keywordSets.aNPlusBOfSNotationPseudoClasses,
keywordSets.otherPseudoClasses,
keywordSets.vendorSpecificPseudoClasses,
);

keywordSets.shorthandTimeProperties = new Set(['transition', 'animation']);
Expand Down