Replies: 2 comments
-
Hello @Plovst |
Beta Was this translation helpful? Give feedback.
-
Related: What's breaking changes from v4? Comply with the new import stepsFrom v4 onwards, the plugin looks for the additional
@import "tailwindcss";
@layer base {
/* ... */
}
If you want to split it into multiple parts, this shorthand means the following: @layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/preflight.css" layer(base);
@import "tailwindcss/utilities.css" layer(utilities);
@layer base {
/* ... */
} ConfigurationFrom version 4 onwards, the legacy JS-based configuration is no longer available by default. I recommend checking out the CSS-first configuration, which is the primarily recommended approach and provides configuration options directly from a CSS file.
If you still want to use the JS configuration, you need to specify its relative path with the @import "tailwindcss";
@config "../../tailwind.config.js";
@layer base {
/* ... */
} Tailwind CSS IntelliSense
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having an issue with Intellisense no longer working after upgrading to V4. I can see others have issues with this, since the tailwind.config.js is no longer mandatory. In this case I'm still using it though, since it's a Wordpress setup and I'm using values from theme.json in my config.
Amongst other things, I've tried manually pointing to the config file like this, but it doesn't work:
My tailwind.config.js looks like this:
Tailwind.css looks like this:
Any obvious errors I'm not seeing?
Beta Was this translation helpful? Give feedback.
All reactions