Sass: Unknown function 'div'
https://sass-lang.com/documentation/breaking-changes/slash-div:
Sass currently treats
/as a division operation in some contexts and a separator in others. This makes it difficult for Sass users to tell what any given/will mean, and makes it hard to work with new CSS features that use/as a separator....
To ease the transition, we’ve begun by adding the
math.div()function. The/operator still does division for now, but it also prints a deprecation warning when it does so. Users should switch all division to usemath.div()instead.
Hi !
WebStorm create error if i use math.div($number, $value) in a scss file, but it works !
Please add div function in sass plugin.
Thanks
Please sign in to leave a comment.
Fixed in 2021.2, see https://youtrack.jetbrains.com/issue/WEB-51021#focus=Comments-27-4978592.0-0
Elena Pogorelova worth mentioning 2021.2 is an UPCOMING version (the way you phrased it implies we can just upgrade to solve the issue now). Thanks for the update anyway!
EDIT July 26: 2021.2 is out :-)
Hi all!
Can you help me with the same problem?
I used 2022.2 version of WebStorm firstly. So I've decided to update to 2022.5/ But the problem hasn't fixed up.
By the way, in the main scss file we wrote @use “sass:math”, so WebStorm should understand that all other scss files are included in that main file and there shouldn't be any errors with that. Anyway it works for JS and TS.
If you fixed this bug in version 2021.2, then why I still get this error. Although it doesn't crush building project with npm run dev.
I use next libraries:
"sass-loader": "^9.0.2",
"sass": "^1.69.3",
"stylelint": "^13.6.1",
"stylelint-scss": “^3.18.0”.
Could you share a file the issue can be reproduced with?