Browse documentation
Code
pre, code, kbd, and samp are styled directly, sharing the monospace
font stack and a background/foreground pair.
Inline code, a keyboard shortcut ⌘K, and program output Build succeeded.
function greet(name) {
return `Hello, ${name}!`;
}Show HTML
<p>Inline <code>code</code>, a keyboard shortcut <kbd>⌘K</kbd>, and program output <samp>Build succeeded</samp>.</p>
<pre><code>function greet(name) {
return `Hello, ${name}!`;
}</code></pre>
<p>Inline <code>code</code>, a shortcut <kbd>⌘K</kbd>, and output <samp>Build succeeded</samp>.</p>
<pre><code>function greet(name) {
return `Hello, ${name}!`;
}</code></pre>
Behavior #
code,kbd, andsampare inline block with padding;preis a block with its own padding, andpre code/pre sampreset to inherit size, family, and background so the fenced block look isn't doubled.- Background/foreground:
--cirth-code-background-color/--cirth-code-color. kbduses its own pair,--cirth-code-kbd-background-color/--cirth-code-kbd-color, inverted from the page background/foreground by default, so a kbd key reads as a small solid chip.prescrolls horizontally (overflow-x: auto) instead of breaking the page layout on long lines.