Skip to content

Commit 9d9d36e

Browse files
author
Abdul Haseeb
committed
Amended docs
1 parent 2303d97 commit 9d9d36e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,29 @@ module.exports = {
134134
}
135135
```
136136

137+
Additionally, if you want to use the `theme()` helper function for customization, you can do so:
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+
137160
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.
138161

139162
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

Comments
 (0)