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 interpolation in function-calc-no-invalid #4046

Merged
merged 3 commits into from Apr 25, 2019

Conversation

ota-meshi
Copy link
Member

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

Closes #3908

Is there anything in the PR that needs further explanation?

No, it's self explanatory.

Copy link
Member

@hudochenkov hudochenkov left a comment

Choose a reason for hiding this comment

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

Could you add examples from original issue to tests, please? It might have something to do with calc expression being multi-line.

@@ -50,6 +50,9 @@
"(" return 'LPAREN';
")" return 'RPAREN';

#\{([\s\S]*?)\} return 'UNKNOWN'; // scss variable
Copy link
Member

Choose a reason for hiding this comment

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

// scss interpolation

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for pointing out!
I fixed this.

@ota-meshi
Copy link
Member Author

@hudochenkov Thank you for your review!
I added the following test case.

      a {
        width: calc(
          #{$min-value} +
          #{strip-unit($max-value - $min-value)} *
          (100vw - #{$min-vw})
        );
      }

Copy link
Member

@hudochenkov hudochenkov left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@hudochenkov hudochenkov merged commit 355f06b into master Apr 25, 2019
@hudochenkov hudochenkov deleted the issue-3908 branch April 25, 2019 20:38
@hudochenkov
Copy link
Member

  • Fixed: function-calc-no-invalid false positives for interpolation (#4046).

@Bigdragon13th
Copy link

When will this be released? Want to turn on the rule, but this issue prevent me.

@benjamincharity
Copy link

This issue is also a blocker for us 👍

@hudochenkov
Copy link
Member

@Bigdragon13th @benjamincharity it will be released this week.

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 interpolation in function-calc-no-invalid
5 participants