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

Fixed: false positives Scss selector with nested properties. #2102

Merged
merged 1 commit into from Nov 26, 2016

Conversation

4 participants
@evilebottnawi
Member

evilebottnawi commented Nov 22, 2016

Which issue, if any, is this issue related to?

#2093

Is there anything in the PR that needs further explanation?

No, it's self explanatory.

I believe that the rule does not work correctly and we should fix this in 8.0.0.

Example:

.foo .bar > .foobar { & .test { @media screen { color: red; } } }

We this line use for check on nested

if (rule.nodes.some(node => node.type === "rule" || node.type === "atrule")) { return }

And we get:

  1. We use walkRules.
  2. Here we have 2 selector .foo .bar > .foobar and & .test
    First selector have nodes and return.
    Second selector have nodes and return.
    But we should get error here.

Also rule don't work with nested properties.

/cc @davidtheclark @jeddy3

@evilebottnawi

This comment has been minimized.

Member

evilebottnawi commented Nov 22, 2016

strange, some tests failed

@ntwb

ntwb approved these changes Nov 23, 2016

LGTM

@jeddy3

This comment has been minimized.

Member

jeddy3 commented Nov 26, 2016

As this addresses the immediate parse error, I think we should merge this.

@evilebottnawi Can you create two new issues to discuss your other findings; one for .foo .bar > .foobar { & .test { @media screen { color: red; } } } and another for nested properties.

@jeddy3

jeddy3 approved these changes Nov 26, 2016

@davidtheclark davidtheclark merged commit 3486515 into master Nov 26, 2016

4 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 95.684%
Details
@davidtheclark

This comment has been minimized.

Contributor

davidtheclark commented Nov 26, 2016

Added note to changelog:

  • Fixed: selector-max-compound-selectors ignores SCSS nested declarations (#2102)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment