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

4 participants
@CAYdenberg
Contributor

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 from Fix issue-3449 to FIX false positives for selector-descendant-combinator-no-non-space Aug 1, 2018

@jeddy3

This comment has been minimized.

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.

@jeddy3

jeddy3 approved these changes Aug 2, 2018

LGTM

@hiroppy

hiroppy approved these changes Aug 2, 2018

@jeddy3 jeddy3 changed the title from FIX false positives for selector-descendant-combinator-no-non-space to Fix false positives for selector-descendant-combinator-no-non-space Aug 2, 2018

@CAYdenberg CAYdenberg merged commit 3dba716 into master Aug 2, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.0005%) to 96.026%
Details

@evilebottnawi evilebottnawi deleted the issue-3449 branch Aug 2, 2018

@jeddy3

This comment has been minimized.

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