Tailwind 排版,为了添加开始和结束引号,请向块引号添加 anafter
和伪元素:before
<blockquote>
:after
<p>Lorem ipsum.</p>
:before
</blockquote>
Run Code Online (Sandbox Code Playgroud)
我想自定义样式,仅删除结束引号以匹配此模式:
是否可以从 tailwind.config.js 自定义它,或者我应该使用 CSS 和 覆盖样式!important
?
如本期所述:https://github.com/tailwindlabs/tailwindcss-typography/issues/66#issuecomment-756834635
您可以将以下配置添加到您的tailwind.config.js
:
module.exports = {
theme: {
// ...
extend: {
typography: {
quoteless: {
css: {
'blockquote p:first-of-type::before': { content: 'none' },
'blockquote p:first-of-type::after': { content: 'none' },
},
},
},
},
},
//...
}
Run Code Online (Sandbox Code Playgroud)
然后将该类添加prose-quoteless
到您的散文元素中以删除所有引号。
归档时间: |
|
查看次数: |
2304 次 |
最近记录: |