# Fix 'Unknown at rule @tailwind' warning in VS Code

> How to fix the Unknown at rule @tailwind warning in VS Code by switching the CSS language mode to Tailwind or setting Unknown At Rules to ignore.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2022-06-27 | Topics: [CSS](https://flaviocopes.com/tags/css/) | Canonical: https://flaviocopes.com/fix-unknown-at-rule-tailwind/

Problem: you include Tailwind in a project like this, but you get the warning `Unknown at rule @tailwindcss(unknownAtRules)` in [VS Code](https://flaviocopes.com/vscode):

![VS Code showing Unknown at rule @tailwind error with red underlines on @tailwind directives](https://flaviocopes.com/images/fix-unknown-at-rule-tailwind/Screen_Shot_2022-06-23_at_14.31.23.jpg)

Here's how to fix this.

Open a CSS file in your project, and from the VS Code Command Palette choose "Change Language Mode", then pick "Tailwind CSS" from the list.

Another way is to open `.vscode/settings.json` (create it if you don't have it in your project) and type

```json
{
  "files.associations": {
    "*.css": "tailwindcss"
  }
}
```

In VS Code you can also hide those warnings, because they're just ...warnings we don't need to be warned about.

Open the settings, search for "unknown", the first result should be the one you're looking for: `CSS > Lint: Unknown At Rules`:

![VS Code settings showing CSS Lint Unknown At Rules option set to warning](https://flaviocopes.com/images/fix-unknown-at-rule-tailwind/Screen_Shot_2022-06-23_at_14.31.38.jpg)

Change that to `ignore`:

![VS Code settings showing CSS Lint Unknown At Rules dropdown changed to ignore option](https://flaviocopes.com/images/fix-unknown-at-rule-tailwind/Screen_Shot_2022-06-23_at_14.31.43.jpg)

Done!

![VS Code editor showing @tailwind directives without error underlines after fixing the warning](https://flaviocopes.com/images/fix-unknown-at-rule-tailwind/Screen_Shot_2022-06-23_at_14.31.50.jpg)
