Variants
| Class | Example |
|---|---|
| .mdst-pre |
{
"name": "modest-ui",
"version": "0.1.0"
}
|
| .mdst-pre--compact |
npm install modest-ui |
| .mdst-pre--borderless |
const x = 1; |
| .mdst-pre--scroll |
This variant allows horizontal scrolling for long lines instead of wrapping text. |
Usage
<!-- Default (wraps text) -->
<pre class="mdst-pre">{
"json": "content"
}</pre>
<!-- Compact -->
<pre class="mdst-pre mdst-pre--compact">single line</pre>
<!-- Borderless -->
<pre class="mdst-pre mdst-pre--borderless">no border</pre>
<!-- Horizontal scroll -->
<pre class="mdst-pre mdst-pre--scroll">long content...</pre>