可以扩展排版插件
tailwind.config.js
module.exports = {
theme: {
typography: {
DEFAULT: { // this is for prose class
css: {
color: theme('colors.yourSpecificColor'), // change global color scheme
p: {
fontSize: '14px', // key can be in camelCase...
'text-align': 'center', // or as it is in css (but in quotes).
},
a: {
// change anchor color and on hover
color: '#03989E',
'&:hover': { // could be any. It's like extending css selector
color: '#F7941E',
},
},
ul: {
'> li': {
'&::before': { // more complex example - add before to an li element.
content: '',
....,
},
},
},
},
},
sm: { // and this is for prose-sm.
css: {
....
},
},
},
},
}
更糟糕的是,如果您在“其他”断点中更改某些内容而不仅仅是散文,例如“prose-sm”、“prose-md”等,更改不会继承,所以如果您将颜色更改为散文中的蓝色,散文中不会改变
定制可以找here
附:在下面的示例中,我可能会弄乱大量的花括号,抱歉,很难跟踪:)