Code
Inline code and code blocks in the noodle's monospace font.
Inline and block
Set the design with data-noodle on the root element.
<html data-noodle="udon" data-mode="dark">
<button class="mn-btn">Hello</button>
</html>
<p>Set the design with <code class="mn-code">data-noodle</code> on the root element.</p>
<pre class="mn-pre" tabindex="0"><code><html data-noodle="udon" data-mode="dark">
<button class="mn-btn">Hello</button>
</html></code></pre>Installation
Everything ships in one stylesheet. There is nothing to import per component.
<link rel="stylesheet" href="https://mian.ro/dist/mian.css">Prefer to own the files? /r/code.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.
Class reference
| Class / attribute | Description |
|---|---|
| mn-code | Inline <code>. |
| mn-pre | Block <pre>. |
Accessibility
- Code blocks scroll horizontally; they are focusable only if you add tabindex="0", which you should for long blocks.