How to add a @tailwind CSS rule to css checker

后端 未结 9 1228
無奈伤痛
無奈伤痛 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

提交回复
热议问题