How to add a @tailwind CSS rule to css checker

后端 未结 9 1187
無奈伤痛
無奈伤痛 2020-12-23 08:55

Tailwind adds @tailwind css at rule which is flagged as unknown. How can I avoid this error?

eg styles.css

@tailwind prefligh

相关标签:
9条回答
  • 2020-12-23 09:50

    My recommendation is to install postCSS language support and then rename tailwind.css to tailwind.pcss then change the references in your package.json scripts (or whatever build scripts you are using for tailwind) to tailwind.pcss from tailwind.css and everything should work fine.

    @apply rule is compatible with postCSS: https://github.com/tailwindcss/tailwindcss/issues/325

    0 讨论(0)
  • 2020-12-23 09:54

    After many tests: POSTCSS and STYLUS syntax highlighter, removes warnings but CSS Intellisence is incomplete, does not show the first-utitilies classes Tailwind

    I installed 'language-stylus' plugin, in VSCode

    Settings> User setting:

    "files.associations": {
       "* .css": "stylus"
     },
    

    See you later!

    CSS Intellisence is incomplete

    0 讨论(0)
  • 2020-12-23 09:55

    just add three line into settings.json file

    "css.lint.unknownAtRules": "ignore",
    "css.validate": true,
    "scss.validate": true,
    
    0 讨论(0)
提交回复
热议问题