Tailwind CSS 常见坑避坑指南:最佳实践与解决方案
✔️

Tailwind CSS 常见坑避坑指南:最佳实践与解决方案

published_date
最新编辑 2025年04月08日
summarize
使用 Tailwind CSS 遇到问题?本指南汇总了常见坑点,并提供最佳实践和解决方案,帮助你高效排查错误,优化前端开发体验。
tags
Tailwind CSS

How to Fix unknownAtRules Warnings From Tailwind CSS

Installing Tailwind CSS IntelliSense Plugin

To fix “Unknown at rule @tailwind” warning, start by installing Tailwind CSS IntelliSense plugin.
When that is done, you need to associate your CSS file with Tailwind CSS.
  1. Open the CSS file where you import Tailwind CSS
  1. Press Shift + P and search for “change language mode
  1. Inside the search bar, type “tailwindcss” and select it.
Now your CSS file is associated with Tailwind CSS and the warnings should be gone.