@each directive and url definition

I use each rule and Webstorm considers this as an error, because literally it cannot find '$(val).svg' in assets directory.

 

Is there any way I can fix this?

 

 

0

You can suppress the error with a comment, like:

//noinspection CssUnknownTarget
background: url("./assets/$(val).svg")
0

So IDE cannot resolve this by any chance?

0

sure it can't, it won't evaluate your code when trying to resolve paths

0

Maybe there is one global config where I can handle such kind of situations? Because writing each time a comment is clearly not the best solution.

0

No; you can only disable the CSS | Invalid elements | Unknown file or directory inspection in Settings | Editor | Inspections

0

请先登录再写评论。