Article body
Readable long-form text: a lead paragraph, headings, lists, a pull quote, a table and a code sample, set on a comfortable line length. Use it for the body of an article or guide. Wrap your own content in blk-prose and every element inside is styled.
<section class="blk-section" aria-labelledby="blk-prose-h">
<div class="blk-container">
<article class="blk-prose">
<p class="blk-prose__lead">A lead paragraph in a larger size, saying what the article covers in a sentence or two.</p>
<h2 id="blk-prose-h">A section heading</h2>
<p>Body text is set at a comfortable measure so it stays easy to read. Links look like <a href="#">this</a> and stay underlined.</p>
<ul>
<li>Lists keep their spacing and markers.</li>
<li>Use them for steps, options or short facts.</li>
</ul>
<blockquote>A quote or key point that deserves a pause, set apart from the text around it.</blockquote>
<h3>A sub-section</h3>
<p>Tables get a clear header row and thin rules between rows.</p>
<table>
<thead><tr><th scope="col">Option</th><th scope="col">Best for</th></tr></thead>
<tbody>
<tr><td>First</td><td>The common case</td></tr>
<tr><td>Second</td><td>The unusual case</td></tr>
</tbody>
</table>
<pre><code>npm run build</code></pre>
</article>
</div>
</section>.blk-prose { max-width: var(--blk-container-narrow); }
.blk-prose > * + * { margin-top: 1.1em; }
.blk-prose__lead { font-family: var(--blk-font-heading); font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; color: var(--blk-heading); }
.blk-prose h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-top: 1.8em; }
.blk-prose h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); margin-top: 1.5em; }
.blk-prose a { color: var(--blk-accent); text-decoration: underline; text-underline-offset: 3px; }
.blk-prose a:hover { color: var(--blk-accent-dark); }
.blk-prose ul, .blk-prose ol { padding-left: 1.4em; }
.blk-prose li + li { margin-top: .5em; }
.blk-prose li::marker { color: var(--blk-accent); }
.blk-prose blockquote { margin-left: 0; padding: 1em 1.4em; border-left: 4px solid var(--blk-accent); background: var(--blk-band-a); border-radius: 0 var(--blk-radius) var(--blk-radius) 0; font-family: var(--blk-font-heading); font-size: 1.1rem; color: var(--blk-heading); }
.blk-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.blk-prose th, .blk-prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--blk-line); }
.blk-prose th { font-family: var(--blk-font-heading); font-weight: 600; color: var(--blk-heading); border-bottom: 2px solid var(--blk-heading); }
.blk-prose pre { overflow-x: auto; padding: 14px 16px; border-radius: var(--blk-radius); background: var(--blk-dark); color: var(--blk-on-dark); font-size: .88rem; }How to customise it
- Wrap any article content in blk-prose. You do not add classes to the paragraphs, lists or headings.
- Use h2 for sections and h3 for sub-sections. The page title is the only h1.
- The lead paragraph class is blk-prose__lead. Use it once, for the first paragraph.
- Links inside the text are underlined and take the accent colour. Keep link text meaningful.
Tokens it reads
--blk-ink--blk-heading--blk-accent--blk-line--blk-band-a--blk-container-narrowAdd the "Article body" block from Product Scope Blocks (https://resources.productscope.uk/blocks/blocks/article-body) to my page. Link https://resources.productscope.uk/blocks/blocks/kit/blocks.css once. Paste the HTML from https://resources.productscope.uk/blocks/blocks/kit/blocks/article-body.html and replace the placeholder text with my real content. Do not change the class names, add inline styles or add scripts. To change colours or fonts, override the --blk- variables in my own CSS. Do not invent facts, clients or numbers.