-
I'm not a fan of the spacing in Tailwind Typography, so I want to override the base modifier in styles.js, which almost the entire file. I've created a new defaultModifiers with the code I want, like so:
But when I tried overriding the Typography plugin in
Am I doing something wrong? Or does Tailwind Typography not support overriding? If I can't override Tailwind Typography, could I just modify the one |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
As per the documentation for @tailwindcss/typography, you can customize the styles by putting it under module.exports = {
// …
theme: {
extend: {
typography: {
DEFAULT: {
// Custom CSS here ↓
css: {
fontSize: '1rem',
lineHeight: '1.75rem',
// More custom CSS…
},
},
},
},
},
plugins: [
require('@tailwindcss/typography'),
],
}, |
Beta Was this translation helpful? Give feedback.
-
I came here to mention that the |
Beta Was this translation helpful? Give feedback.
-
FWIW, I found the tw typography plugin very hard to customize. So I ended up creating my own version by grabbing the code from the tw repo. I now just customize it's values directly. It made it much easier to use. (I just have to it --and not the default tw one, in the |
Beta Was this translation helpful? Give feedback.
As per the documentation for @tailwindcss/typography, you can customize the styles by putting it under
theme.extend.typography
like so: