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
+23
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,29 @@ module.exports = {
134
134
}
135
135
```
136
136
137
+
Like with all theme customizations in Tailwind, you can also define the `typography` key as a function if you need access to the `theme` helper:
138
+
139
+
```js
140
+
// tailwind.config.js
141
+
module.exports= {
142
+
theme: {
143
+
typography: (theme) => ({
144
+
default: {
145
+
css: {
146
+
color:theme('colors.gray.800'),
147
+
148
+
// ...
149
+
}
150
+
}
151
+
})
152
+
},
153
+
plugins: [
154
+
require('@tailwindcss/typography'),
155
+
// ...
156
+
],
157
+
}
158
+
```
159
+
137
160
Customizations should be applied to a specific modifier like `default` or `xl`, and must be added under the `css` property. Customizations are authored in the same [CSS-in-JS syntax](https://tailwindcss.com/docs/plugins#css-in-js-syntax) used to write Tailwind plugins.
138
161
139
162
It's important to note that all customizations are **merged** with the defaults. If you'd like to completely override a provided size modifier, you can do so by disabling that modifier so the default styles are not included.
0 commit comments