Prose

A page written with plain tags inside .prose, beside elements, and how to override one tag.

Updated

A page of plain HTML needs no stylesheet knowledge. This article has one class, prose, on the wrapper, and none on any tag inside it.

A page of plain tags

Notes from the road

The pack stayed under 8 kg, and nothing in it was bought for the trip.

What went in

  • Two shirts
  • One jacket
  • A charger for everything

Take half the clothes and twice the money.

What came back

Mostly the same things, a little more worn.


<article class="prose">
	<h1>Notes from the road</h1>
	<p>
		The pack stayed under <strong>8 kg</strong>, and nothing in it was
		bought for the trip.
	</p>
	<h2>What went in</h2>
	<ul>
		<li>Two shirts</li>
		<li>One jacket</li>
		<li>A <code>charger</code> for everything</li>
	</ul>
	<blockquote>
		<p>Take half the clothes and twice the money.</p>
	</blockquote>
	<h2>What came back</h2>
	<p>Mostly the same things, a little more worn.</p>
</article>

With elements

Prose styles only its direct children. An element placed among them keeps its own colours, size and spacing, and the tags inside it are not styled as prose. A button link keeps its colour, and the card is not indented or underlined.

Plain tags and elements

Plans

A paragraph beside an element, and a link that is a button:

Pro

Per month

A component placed among the blocks keeps its own look, so the card is not styled as prose.


<div class="prose">
	<h2>Plans</h2>
	<p>A paragraph beside an element, and a link that is a button:</p>
	{ui card, title: 'Pro', description: 'Per month'}
		<p>
			A component placed among the blocks keeps its own look, so the
			card is not styled as prose.
		</p>
		{block footer}
			{ui button, title: 'Choose', href: '#' /}
		{/block}
	{/ui}
</div>

Overriding a tag

To change one tag, give it a class or a utility. It beats prose without raising specificity.

A class wins

A small heading

A muted paragraph.

A link with no underline.


<div class="prose">
	<h2 class="text-sm uppercase">A small heading</h2>
	<p class="text-muted">A muted paragraph.</p>
	<p>
		A link with
		<a
			href="#"
			class="no-underline"
		>no underline</a>.
	</p>
</div>

To change a tag everywhere in prose, write a rule for it in the site's own CSS, after the preset's, the way theming does for tokens.