-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Add range context support for media-feature-name-* rules #4581
Add range context support for media-feature-name-* rules #4581
Conversation
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.
@jdiogopeixoto Thank you so much for this substantial piece of work!
The tests and documentation look good to me.
You weren't to know this, but I believe @evilebottnawi was keen to refactor these rules to use postcss-values-parser rather than postcss-media-query-parser as the latter is no longer maintained. I believe such a refactor would remove the need to introduce styleSearch
into the rules.
However, refactoring is a more extensive piece of work and is something we can do at a later date. I believe this pull request addresses the needs of the user, and so gets my approval.
I can create a follow-up issue for the refactor after we merge this pull request.
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.
Nice work!
} | ||
|
||
function getRangeContextName(parsedNode) { | ||
if (parsedNode.length === 3) { |
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.
Could you add a comment into the code explaining what is this 3
? It's not clear where this number came from.
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.
Yes, I added more context to that.
I fixed the conflict from merging #4561. |
After we merge this, I will work on #4539 as I believe this is the last unmerged pull request with documentation changes. |
|
Closes #1744
No, it's self explanatory.