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/element-no-unknown #5959
Conversation
@@ -244,16 +295,17 @@ keywordSets.otherPseudoClasses = new Set([ | |||
'first-child', | |||
'first-of-type', | |||
'focus', | |||
'focus-ring', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from an old draft
cf https://caniuse.com/css-focus-visible
88c3797
to
4a25c72
Compare
// TODO migrate to vendorSpecificPseudoClasses | ||
// see #2264 | ||
keywordSets.webkitProprietaryPseudoClasses = new Set([ | ||
// https://webkit.org/blog/363/styling-scrollbars/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this source was the cause of the typo
'valid', | ||
'visited', | ||
'window-inactive', // for ::selection (chrome) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also in webkitScrollbarPseudoClasses
strictly speaking, the one at l381 is not necessary anymore
but it's better that way (less brittle to refactoring)
4a25c72
to
186dc1e
Compare
'focus-within', | ||
'focus-visible', | ||
'fullscreen', | ||
'fullscreen-ancestor', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supported by Opera 12
186dc1e
to
b22a16c
Compare
@@ -238,22 +289,22 @@ keywordSets.otherPseudoClasses = new Set([ | |||
'default', | |||
'defined', | |||
'disabled', | |||
'drop', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b22a16c
to
b3e34dc
Compare
There are many more that are missing but Ill stop here; the PR has to be reviewable. |
7d74bc5
to
c7a2309
Compare
5dc6331
to
e5805bd
Compare
@@ -164,12 +167,6 @@ testRule({ | |||
line: 2, | |||
column: 9, | |||
}, | |||
{ | |||
code: '::-webkit-unknown:window-inactive { }', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it detected unknown pseudo elements, it would now correctly reject ::-webkit-unknown
.
That's not what we are testing though.
e5805bd
to
89cac56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all these!
Can you run npm run format
to fix the linting, please?
This comment was marked as resolved.
This comment was marked as resolved.
…nown add ::cue, ::target-text, :unresolved, :picture-in-picture, :window-inactive, :fullscreen-ancestor, etc. remove :focus-ring, :drop typo ::-webkit-resizer https://hg.mozilla.org/mozilla-central/file/tip/layout/style/test/test_non_content_accessible_pseudos.html#l8 https://hg.mozilla.org/mozilla-central/file/tip/layout/style/test/test_selectors.html#l1102 https://trac.webkit.org/changeset/252330/webkit/ keywords: datetime, meter, search, validation, any, drag
89cac56
to
83f7fa2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mouvedia Thank you! 👍🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
|
followup of #5956
see #5956 (comment)
#2264
Ill add comments on the relevant lines.
Remember to check the commit's message.