I'm trying to use Tailwind with my WebStorm IDE, however, I get this error:
Unknown CSS at rule
whenever I use @apply
or @tailwind
Here's how to fix this. Open the settings, search for “unknown”, the first result should be the one you're looking for: CSS > Lint: Unknown At Rules : Change that to ignore : Done!
Tailwind Starter Kit is a beautiful extension for TailwindCSS, which is Free and Open Source.
Tailwind is not currently supported, please follow WEB-42792 and linked tickets for updates.
Disabling Unknown CSS at-rule inspection in Preferences | Editor | Inspections | CSS | Invalid elements is the only way to avoid Unknown CSS At Rule error; note that some Tailwind rules can cause syntax errors that come from low level checking and can't be disabled (like Unexpected token, etc.). In such cases, I can only suggest turning the syntax highlighting off for such files to avoid errors: open your file in editor, click the Hector icon in the lower right corner and then move the slider to change the Highlighting level to None, then re-open the project. See https://www.jetbrains.com/help/phpstorm/disabling-and-enabling-inspections.html#change-highlighting-level-for-file.
If you don't want to disable at-rules errors in your configuration IDE. You can choose this syntax. Hope this will help :)
// noinspection CssInvalidAtRule
@tailwind base;
// noinspection CssInvalidAtRule
@tailwind components;
// noinspection CssInvalidAtRule
@tailwind utilities;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With