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(complex): ignore traversals selector types #964
fix(complex): ignore traversals selector types #964
Conversation
Thanks for the fix.
Can you add a test case for that, please? |
Thanks for this fix, really looking forward to it :) |
Pull Request Test Coverage Report for Build 8064517022Details
💛 - Coveralls |
In my case analyze-css is used by yellowlabtools. YellowLabTools reports complex selectors as being more than 3 selectors, but now it seems to be including selectors that were previously considered OK. in the old version it reports as expected: https://yellowlab.tools/result/gtr25fqnyn/rule/cssComplexSelectors but the new version being developed reports very differently: http://yellowlab.tools:8282/result/gtr26h6mbq/rule/cssComplexSelectors You can see the list of detected selectors in the second link, but a couple from that list include: These should be returned as 3 selectors complexity
and in more detail footer nav {
a {
margin: .2rem;
}
i {
margin-bottom: .2rem;
}
}
main nav {
margin-top: var(--s2);//pagination margin
a,span {
margin: .2rem;
}
} both are the same site: https://abridge.netlify.app/ This once merged will reportedly fix the issue: YellowLabTools/YellowLabTools#386 (comment) |
I've rebased this PR to merge into c9d6af8 that introduces some test cases. |
complex selectors should ignore traversals selector types
So
#foo .bar ul li a
complixity level would be5
rather than9