如何自定义尾风排版阻滞

发布于 2025-02-14 02:09:21 字数 459 浏览 0 评论 0原文

为了添加打开和关闭报价,尾风的排版在和之后添加 pseudo元素之后添加

<blockquote>
    :after
    <p>Lorem ipsum.</p>
    :before
</blockquote>

我想自定义样式删除闭幕报价以匹配此内容模式:

“在此处输入图像说明”

是否可以从tailwind.config.js自定义它,还是我应该用CSS和<代码>!重要?

Tailwind typography, In order to add opening and closing quotes, add an after and before pseudo elements to blockquotes:

<blockquote>
    :after
    <p>Lorem ipsum.</p>
    :before
</blockquote>

I want to customize the style removing just the closing quotes to match this pattern:

enter image description here

Is it possible customize it from tailwind.config.js or should I override styles with CSS and !important?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

层林尽染 2025-02-21 02:09:21

如本期所述: 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' },
          },
        },
      },
    },
  },
  //...
}

并将类散文Quoteless添加到您的散文元素删除所有报价。

As described in this issue: https://github.com/tailwindlabs/tailwindcss-typography/issues/66#issuecomment-756834635

You can add following configuration to your 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' },
          },
        },
      },
    },
  },
  //...
}

and add the class prose-quoteless to your prose element afterwards to remove all quotes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文