You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a deeper dive into configuration, you can check out the [Tailwind Official Documentation](https://tailwindcss.com/docs/configuration).
81
+
82
+
## Add Tailwind directives
83
+
84
+
In your `src/index.css` file, add the following Tailwind directives:
85
+
86
+
```css
87
+
@tailwind base;
88
+
@tailwind components;
89
+
@tailwind utilities;
90
+
```
91
+
92
+
These directives inform PostCSS that you're using Tailwind and establish the order of the directives. You can append custom CSS below these directives.
2. Add `@tailwind/postcss` to the `plugins` in your PostCSS configuration. If you do not have a PostCSS configuration file, create a new one called `postcss.config.mjs`.
51
+
52
+
```js title="postcss.config.mjs"
53
+
exportdefault {
54
+
plugins: {
55
+
"@tailwindcss/postcss": {},
56
+
}
57
+
}
78
58
```
79
59
80
60
For a deeper dive into configuration, you can check out the [Tailwind Official Documentation](https://tailwindcss.com/docs/configuration).
81
61
82
-
## Add Tailwind directives
62
+
## Import TailwindCSS
83
63
84
-
In your `src/index.css` file, add the following Tailwind directives:
64
+
Add an `@import` to your `src/index.css` file that imports Tailwind CSS.
85
65
86
-
```css
87
-
@tailwind base;
88
-
@tailwind components;
89
-
@tailwind utilities;
66
+
```css title="src/index.css"
67
+
@import"tailwindcss";
90
68
```
91
69
92
-
These directives inform PostCSS that you're using Tailwind and establish the order of the directives. You can append custom CSS below these directives.
0 commit comments