Search code examples
csstailwind-csspostcss

Errors on CSS files because of the nesting rules


I'm building a project which is using tailwindcss + postcss. I also have tailwindcss/nesting plugin, and that's where the issue comes in.

I am getting VSCode errors on my CSS files because of the nesting rules. This is fixed when I change my .css file to .pcss, is this normal? Should I change all the files to .pcss to prevent the nesting VSCode errors or is there a better alternative?


Solution

  • How to parse .css files as PostCSS in vscode?

    This StackOverflow post answered my question ^

    Change this in the User Settings (JSON) VSCode

    "files.associations": {
       "*.css": "postcss"
    }