Tailwind CSS on GitHub

@tailwindcss/typography

一个提供漂亮默认排版的官方首选插件

@tailwindcss/typography 插件添加了一组可定制的 prose 类,您可以用它为任何普通的 HTML 添加漂亮的默认排版,就像您在解析 Markdown 后得到的输出,或者您从 CMS 中提取的内容。

<article class="prose lg:prose-xl">
  <h1>Garlic bread with cheese: What the science tells us</h1>
  <p>
    For years parents have espoused the health benefits of eating garlic bread with cheese to their
    children, with the food earning such an iconic status in our culture that kids will often dress
    up as warm, cheesy loaf for Halloween.
  </p>
  <p>
    But a recent study shows that the celebrated appetizer may be linked to a series of rabies cases
    springing up around the country.
  </p>
  <!-- ... -->
</article>

它提供了您所期望的一切合理的默认值,比如:

  • 基本排版
  • 标题样式
  • 表格
  • 有序和无序列表
  • 横向规则
  • ...更多

想了解更多,请查看现场演示和阅读 GitHub 上的文档。