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 for selector-descendant-combinator-no-non-space #3508

Merged
merged 2 commits into from Aug 2, 2018

Conversation

CAYdenberg
Copy link
Contributor

@CAYdenberg CAYdenberg commented Aug 1, 2018

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

fixes #3449

Is there anything in the PR that needs further explanation?

This rule is a little bit strange in that a descendent combinator is always whitespace, it's just not always a single space. In fact the logic of the rule checks that the combinator is not one of the standard "non-space" combinators (+, >) and passes if that is the case.

For this particular bug, PostCSS apparently determined that +($column - 1) is a combinator, which is odd, and it is not a non-space combinator nor is it a single space.

Anyway, since what are really looking is whitespace combinators that are not single spaces, I changed the logic to do that instead. It's a bit of a work-around but it covers the case in question and most importantly does not regress.

@CAYdenberg CAYdenberg changed the title Fix issue-3449 FIX false positives for selector-descendant-combinator-no-non-space Aug 1, 2018
@jeddy3
Copy link
Member

jeddy3 commented Aug 2, 2018

PostCSS apparently determined that +($column - 1) is a combinator, which is odd

This might change in #3284.

Anyway, since what are really looking is whitespace combinators that are not single spaces, I changed the logic to do that instead.

LGTM. Even if the behaviour of the parser changes, I think the logic in this PR is clear.

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jeddy3 jeddy3 changed the title FIX false positives for selector-descendant-combinator-no-non-space Fix false positives for selector-descendant-combinator-no-non-space Aug 2, 2018
@CAYdenberg CAYdenberg merged commit 3dba716 into master Aug 2, 2018
@alexander-akait alexander-akait deleted the issue-3449 branch August 2, 2018 17:01
@jeddy3
Copy link
Member

jeddy3 commented Aug 3, 2018

  • Fixed: selector-descendant-combinator-no-non-space false positives for calculations with parenthesis (#3508).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Fix false positives for calculations with parenthesis in selector-descendant-combinator-no-non-space
4 participants