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
Copy file name to clipboardExpand all lines: README.md
+48-56
Original file line number
Diff line number
Diff line change
@@ -26,19 +26,11 @@ Install the plugin from npm:
26
26
npm install -D @tailwindcss/typography
27
27
```
28
28
29
-
Then add the plugin to your `tailwind.config.js` file:
29
+
Then add the plugin to your main `style.css` file:
30
30
31
-
```js
32
-
/**@type{import('tailwindcss').Config}*/
33
-
module.exports= {
34
-
theme: {
35
-
// ...
36
-
},
37
-
plugins: [
38
-
require('@tailwindcss/typography'),
39
-
// ...
40
-
],
41
-
}
31
+
```diff
32
+
@import "tailwindcss";
33
+
+ @plugin "tailwindcss/typography";
42
34
```
43
35
44
36
---
@@ -234,7 +226,15 @@ Note that you can't nest new `prose` instances within a `not-prose` block at thi
234
226
235
227
### Adding custom color themes
236
228
237
-
You can create your own color theme by adding a new key in the `typography` section of your `tailwind.config.js` file and providing your colors under the `css` key:
229
+
To customize the color theme beyond simple CSS overrides, you can use the JavaScript based theme API. To do that, you will need to load `@tailwindcss/tyypography` using the `@config` directive instead of the `@plugin` directive:
230
+
231
+
```diff
232
+
@import "tailwindcss";
233
+
- @plugin "@tailwindcss/typography";
234
+
+ @config "./tailwind.config.js";
235
+
```
236
+
237
+
You can then create your own color theme by adding a new `tailwind.config.js` file with the `typography` section and providing your colors under the `css` key:
0 commit comments