← Writing
3 min read

How to fix "unknown @ rule errors" on Zed when using Tailwind v4

To remove the "unknown @ rule" warnings in Zed with Tailwind v4, set tailwindcss-language-server as the language server for CSS in your Zed settings. The Tailwind language server is already included in Zed.

I switched back to Zed from Antigravity. It was fun when it lasted until I reflected on 2025 on the whole only to realize most of my programming interaction has been with an agent (Cursor specifically), rather than me breaking my head and learning new things.

The moment I moved back, I hit up on this annoying warning on my CSS files which shows “unknown @ rule errors” when you use Tailwind v4 for your projects on Zed.

The trick is simple. The Tailwind CSS language server is already included in Zed, so all you have to do is make it the default language server for CSS files.

How to fix “unknown @ rule” errors in Zed with Tailwind v4

  1. Open your Zed settings and search for “language server”.

  2. Add the following configuration:

    "languages": {
        "CSS": {
          "language_servers": ["tailwindcss-language-server"],
        },
      },
  3. Save the settings.

That’s it. Now you can use Tailwind v4 without any warnings on Zed.


Ref:

Frequently asked questions

How do I fix "unknown @ rule" errors in Zed with Tailwind v4?

Open your Zed settings and add a languages entry for CSS with language_servers set to ["tailwindcss-language-server"]. The warnings go away on CSS files that use @apply or other @ properties.

Do I need to install the Tailwind language server in Zed?

No. The Tailwind CSS Language Server is already included in Zed. You only need to make it the default language server for CSS files.

Karthik Kamalakannan
Karthik Kamalakannan

I founded Skcript. Over the last , I've built highly scalable B2B software for both Skcript and its clients. Design-led products, rock-solid stability, and a bias for shipping.