The syntax of postcss-simple-vars in postcss reports an error in the editor

Business background

  • use the vue-cli3.0 framework under webstorm to learn postcss .
  • parameters need to be passed when using mixed macros (plug-ins are postcss-mixins )
  • the variable plug-in used to pass parameters is postcss-simple-vars

troubles encountered

  • postcss-simple-vars the syntax for defining and using variables is the same as scss with $.
  • but the editor reports an error when defining variables and referencing variables

    • define variables Times: property name expected
    • quote variable Times: a term expected

sample code

clipboard.png

try to solve

  • add lang="postcss" to the style tag
  • there is no corresponding option setting in the editor"s css code check

question

  • how do I make sure it doesn"t report an error?
Jun.16,2021

cause of problem

  • webstorm has a built-in postCss support IDE plug-in
  • but it only supports seven postcss plug-ins, which do not include postcss-simple-vars
  • that's why the browser reported an error.

reference: https://blog.jetbrains.com/we.

so how on earth does the editor support postcss $ syntax?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bed2fe-31b77.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bed2fe-31b77.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?