ux-patterns

Reading System

A small, reusable stylesheet for long-form essay and paper pages: one CSS file, an optional script, three themes, a few switches. It grew out of the Essay and Paper Pages research and the In Tech We Trust mockups.

Demo: demo/ (live: claude.ai artifact). Switch theme, accent colour, contents rail, drop caps, and desktop or phone.

What you get

Use it

<link rel="stylesheet" href="reading.css">
<script src="reading.js" defer></script>   <!-- optional -->

<div class="rs" data-rs-theme="magazine" data-rs-rail="on" data-rs-dropcap="on" style="--rs-accent:#c8281e">
  <div class="rs-body"><div class="rs-wrap">
    <nav class="rs-rail"><span class="rs-rail-label">Contents</span><ol class="rs-toc" data-rs-auto></ol></nav>
    <article class="rs-text">
      <!-- your Markdown output goes here -->
    </article>
  </div></div>
</div>

The demo’s template.html shows the full page: chapter bar, header, summary and end matter.

Fonts

Not bundled. Load the line for your theme:

The demo’s <link> line has the exact Google Fonts URL.

Markdown

Inside .rs-text, plain Markdown output is styled as is:

Markdown Becomes
## Title chapter. For the “Chapter 2” label, either add <span class="rs-num">2</span> inside the heading, or set data-rs-chapters="auto" to number every h2 (class rs-unnumbered skips one). Use one or the other, not both
### Title section
#### Title subsection (Magazine: small red label with a rule)
##### Title short definitions (Academic: run-in italic head)
> quote epigraph: small italic, with emphasis set upright. For a source line, write the quote in HTML with <cite>Name</cite>. Blockquotes are always styled as epigraphs, so don’t use them for callouts
[^1] footnotes sidenotes in the margin with reading.js; tap to open on phones. Without the script they stay at the end. GFM’s “Footnotes” heading is ignored by contents and chapter numbers
--- section break (⁂, or ✻ in Personal)

Add these by hand where you want them:

Widths

The layout responds to the width of .rs itself: below 760px it is the phone layout (notes open on tap); from 760px notes sit in the margin; from 1080px the contents rail appears. So give .rs the full page width, not a narrow content column.

Drop caps and Personal’s small-caps first line work without the script for the usual cases (first paragraph after a chapter heading, or after its In brief).

Flowershow

Tokens

All on .rs, all overridable: --rs-accent, --rs-on-accent (text on accent fills), --rs-tint (light wash for In brief and notes, derived from the accent), --rs-bg, --rs-ink, --rs-ink2, --rs-muted, --rs-rule, --rs-text, --rs-display, --rs-ui, --rs-size, --rs-size-phone, --rs-lh, --rs-measure, --rs-margin, --rs-gap, --rs-rail-w, --rs-max, --rs-sticky-top, and the spacing scale --rs-s1 to --rs-s6.

House rules (from Rufus’s reviews)

Build the demo

cd demo && python3 build.py

It reads ~/src/life-itself/publications/tech/essay.md (about 3,100 of the 9,800 words).

v0.1, 2026-10-26.