Typography

Headings, text, links, lists, quotes and code, written as plain tags inside .prose.

Updated

Every example here is plain HTML with no classes, inside one .prose wrapper. Its source is under it.

Headings

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

<div class="prose">
	<h1>Heading 1</h1>
	<h2>Heading 2</h2>
	<h3>Heading 3</h3>
	<h4>Heading 4</h4>
	<h5>Heading 5</h5>
	<h6>Heading 6</h6>
</div>

Sizes run from 2rem for h1 through 1.5rem and 1.25rem for h2 and h3. h4 to h6 keep the text size and are semibold, so use them for structure rather than looks. A heading after another block has extra space above it.

Text

A paragraph with a link, strong, emphasis and inline code.

A second paragraph sits one and a quarter lines below the first.


A rule has two rem above and below.


<div class="prose">
	<p>
		A paragraph with a
		<a
			href="#"
		>link</a>,
		<strong>strong</strong>, <em>emphasis</em> and
		<code>inline code</code>.
	</p>
	<p>A second paragraph sits one and a quarter lines below the first.</p>
	<hr>
	<p>A rule has two rem above and below.</p>
</div>

Blocks have 1.25em between them. Links use --primary and are underlined. code is monospace on a muted fill. An hr has two rem above and below.

Lists

  • Bullets
    • Nested
    • Items
  • Second item
  1. First
  2. Second
  3. Third

<div class="prose">
	<ul>
		<li>Bullets
			<ul>
				<li>Nested</li>
				<li>Items</li>
			</ul>
		</li>
		<li>Second item</li>
	</ul>
	<ol>
		<li>First</li>
		<li>Second</li>
		<li>Third</li>
	</ol>
</div>

A ul has discs and an ol has numbers, both indented 1.5em, with a quarter em between items. Nested lists get the same markers.

Quote

A quote gets a rule on its left and an indent.

Its paragraphs are spaced like any other.


<div class="prose">
	<blockquote>
		<p>A quote gets a rule on its left and an indent.</p>
		<p>Its paragraphs are spaced like any other.</p>
	</blockquote>
</div>

A blockquote has a rule on its left and an indent. Paragraphs inside it are spaced like any other.

Code

git clone repo
cd repo
npm install

<div class="prose">
	<pre><code>git clone repo
cd repo
npm install</code></pre>
</div>

A pre scrolls sideways. The code inside it is not styled again.