user783388
user783388

Reputation:

intellij IDEA: unknown function in SASS file

I am working with Buefy/Bulma and Vue-CLI 3.

I get an unknown function inspection info on the SASS function findColorInvert(...) that I import from the bulma utilities.

I have @import "~bulma/sass/utilities/_all" at the top of my scss file which imports functions.sass:

...    
@function findColorInvert($color)
  @if (colorLuminance($color) > 0.55)
    @return rgba(#000, 0.7)
  @else
    @return #fff
...
Here IntelliJ doesn't even recognize the variable $colorin the function body. Let alone colorLuminance, which is a function defined in the same file.

I have the proper file types set (settings/Editor/File Types: SassStyleSheet:*sass and SCSSStyleSheet:*scss).

When I compile, the correct CSS is generate and I get no error from the CLI.

Upvotes: 1

Views: 2870

Answers (1)

lena
lena

Reputation: 93868

node_modules/bulma is excluded from indexing because it's not listed as a project direct dependency after installing buefy, so functions defined there can't be resolved. Marking it as Not Excluded (right-click the folder, Mark directory as/Cancel exclusion) should fix the issue

enter image description here

Upvotes: 3

Related Questions