Markdown CSS Utility
Installation
<link rel="stylesheet" type="text/css" href="@nvidia-elements/markdown/dist/styles/index.css" />
<link rel="stylesheet" type="text/css" href="@nvidia-elements/markdown/dist/styles/index.css" />
Usage
To style the content inside an HTML element with the markdown styles, add nve-markdown attribute to the element.
Example
CSS utility attribute for applying markdown typography styles to any element without using the Web Component. Use the nve-markdown attribute on a container and import the styles CSS file separately.
<div nve-markdown>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<ul>
<li>Unordered list item 1</li>
<li>Unordered list item 2</li>
</ul>
<ol>
<li>Ordered list item 1</li>
<li>Ordered list item 2</li>
</ol>
<blockquote>this is a blockqoute</blockquote>
<strong>strong</strong>
<del>del</del>
<em>em</em>
<table>
<thead>
<tr>
<th>Syntax</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Header</td>
<td>Title</td>
</tr>
<tr>
<td>Paragraph</td>
<td>Text</td>
</tr>
</tbody>
</table>
</div>
<script type="module">
import "@nvidia-elements/markdown/styles/index.css";
</script>
<div nve-markdown>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<ul>
<li>Unordered list item 1</li>
<li>Unordered list item 2</li>
</ul>
<ol>
<li>Ordered list item 1</li>
<li>Ordered list item 2</li>
</ol>
<blockquote>this is a blockqoute</blockquote>
<strong>strong</strong>
<del>del</del>
<em>em</em>
<table>
<thead>
<tr>
<th>Syntax</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Header</td>
<td>Title</td>
</tr>
<tr>
<td>Paragraph</td>
<td>Text</td>
</tr>
</tbody>
</table>
</div>
<script type="module">
import "@nvidia-elements/markdown/styles/index.css";
</script>
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
- Unordered list item 1
- Unordered list item 2
- Ordered list item 1
- Ordered list item 2
this is a blockqoute
strong del em | Syntax | Description |
| Header | Title |
| Paragraph | Text |
- Headings (
h1, h2, h3, h4, h5, h6) - Unordered Lists (
ul, li) - Ordered Lists (
ol, li) - Blockquote (
blockquote) - Code (
pre, code) - Table (
table, thead, th, tr, td) - Image (
img) - Paragraph (
p) - Links (
a) - Bold (
strong) - Strikethrough (
del) - Italics (
em)