Prose
Source: https://getbootstrap.com/docs/6.0/content/prose
Use the .prose wrapper class to make long form content more easily without the need for specifying Bootstrap classes on every element. Especially useful for converting Markdown or MDX to HTML, or simply for making content heavy pages more readable.
How it works
Wrap your content in the .prose class to get modified font-size, line-height, and spacing specifically designed for long form content that originates from source Markdown files or WYSIWYG editors. Here’s what we do with that class:
- Set a base
font-size,line-height, and some local CSS variables on the parent element. - Normalize the spacing of lists
- Set a default
margin-bottomfor headings. - Some headings get an additional
margin-topto ensure proper spacing between headings and other content. - Style blockquotes, code, and other inline elements.
The .not-prose utility class can be used to opt out of .prose typography styles in specific elements. This is useful for components that have their own styling, such as code snippets or examples. Adding a .prose within a .not-prose won’t work.
Example
Below is an example of Markdown demonstrating several types of HTML content supported in the .prose class.
<div class="prose border rounded-3 p-3 lg:p-5 max-w-100">
