asw/site/content/docs/typography/code.md
Ludo fe8ddd6153
feat: add [data-demo] attribute, purge all inline CSS from docs
New data-demo attribute for demo blocks in documentation.
Replaced 16 files worth of inline style="" wrappers with <div data-demo>.
Only remaining style= is charts --size data injection (legitimate).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 18:53:59 +02:00

29 lines
859 B
Markdown

---
title: "Code"
description: "Inline code and fenced code blocks in ASW."
type: docs
weight: 18
date: 2026-04-11
tags: ["typography", "code", "pre"]
ai-disclosure: "generated"
ai-model: "claude-sonnet-4-6"
ai-provider: "Anthropic"
---
Inline `<code>` uses a monospace font with a subtle background tint. Block-level `<pre><code>` gets a full-width container with padding and horizontal scroll for long lines.
## Inline Demo
<div data-demo>
<p>Use <code>data-callout="tip"</code> to style a callout block, or <code>data-layout="docs"</code> for a sidebar layout.</p>
<pre><code>/* Minimal ASW page */
&lt;!doctype html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;link rel="stylesheet" href="asw.css"&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;main&gt;&lt;article&gt;Hello, ASW.&lt;/article&gt;&lt;/main&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
</div>