Scroll-lit reading
A dateline row with a live date in green, then a large centred light-serif paragraph with ink pictograms in the line. Words turn from grey to black as you scroll, a green N to S rail fills beside it and a paper boat drifts across.
Part of the style
Graph Paper Novel
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/graph-paper-novel/dispatch/figma.html?palette=049f2667596978d7
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/graph-paper-novel/dispatch/figma.html?palette=049f2667596978d7 and pass that whole HTML document to the html_to_figma tool, so the part "Scroll-lit reading" lands as editable layers in my open Figma file. Fonts come from Google Fonts: if a face is missing in Figma, pick the closest one.
Code
<style>
/* Goes after the pack's base.css */
:root {
--page: #020408;
--grid-line: #0a0f16;
--ink: #f0f5ff;
--ink-soft: #969faf;
--ink-dim: #222830;
--panel: #060a10;
--sheet: #000103;
--on-dark: #dde4ed;
--metal-light: #000103;
--metal-mid: #3b424c;
--metal-dark: #a5aebf;
--shade: rgba(240, 245, 255, 0.3);
--shade-light: rgba(240, 245, 255, 0.1);
--sheen: rgba(0, 0, 1, 0.1);
--green: #526483;
--green-hover: #e4edfe;
--scribble: #646e7e;
}
</style>
<section class="dispatch" aria-label="From the book">
<div class="dispatch__meta">
<strong class="dispatch__name">True North.</strong>
<span class="dispatch__subtitle">The Quiet Rules of Getting Home.</span>
<time class="dispatch__date">March 4, 2027, 5:12 AM</time>
<strong class="dispatch__place">Halifax, NS</strong>
</div>
<p class="dispatch__text">
Most of us leave the harbour
<svg class="dispatch__icon" viewBox="0 0 40 30" aria-hidden="true"><path d="M4 21h32l-5 6H9z M20 3v18 M20 4l11 14H20 M20 7l-8 11h8"/></svg>
as if the sea were a road already drawn, without reading
<svg class="dispatch__icon" viewBox="0 0 40 30" aria-hidden="true"><path d="M17 28l2-18h2l2 18z M16 10h8 M18 6h4v4h-4z M20 3v3 M24 8l12-4 M24 8l12 4 M16 8L4 4 M16 8L4 12 M18 16h4 M17 22h6"/></svg>
the wind, without asking which marks truly hold, and trusting that rowing harder will be enough to reach
<svg class="dispatch__icon" viewBox="0 0 40 30" aria-hidden="true"><path d="M20 7v20 M14 11h12 M8 19c1 6 7 8 12 8s11-2 12-8 M5 21l3-3 3 3 M29 21l3-3 3 3"/><circle cx="20" cy="5" r="2.5"/></svg>
the shore. But the water keeps its own ledger, its own
<svg class="dispatch__icon" viewBox="0 0 40 30" aria-hidden="true"><path d="M2 12c4-4 8-4 12 0s8 4 12 0 8-4 12 0 M2 20c4-4 8-4 12 0s8 4 12 0 8-4 12 0"/></svg>
currents, its penalties and its gifts. True North is the story of a course plotted the hard way, and an invitation to learn that arriving
<svg class="dispatch__icon" viewBox="0 0 40 30" aria-hidden="true"><path d="M22 3l10 9-10 9-10-9z M22 21c-2 3-6 4-8 7 M17 25l-3 1 M19 22l-4 0"/></svg>
is not about speed, but about knowing where you stand, and being free to change your heading without fear.
</p>
<div class="dispatch__rail" aria-hidden="true">
<span class="dispatch__pole">N</span>
<span class="dispatch__track"><span class="dispatch__fill"></span></span>
<span class="dispatch__pole">S</span>
</div>
<svg class="dispatch__boat" viewBox="0 0 160 90" aria-hidden="true">
<defs>
<linearGradient id="dispatch-paper" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" style="stop-color: var(--metal-light)"/>
<stop offset="1" style="stop-color: var(--metal-mid)"/>
</linearGradient>
</defs>
<path d="M6 48h148l-26 36H32z" style="fill: var(--metal-mid)"/>
<path d="M6 48l74-44 74 44z" style="fill: url(#dispatch-paper)"/>
<path d="M80 4l-22 44h44z" style="fill: var(--metal-light)"/>
<path d="M6 48h148M80 4v44M58 48l22-44 22 44M32 84l48-36 48 36" fill="none" style="stroke: var(--metal-dark)" stroke-width="0.8"/>
<g fill="none" style="stroke: var(--metal-dark)" stroke-width="0.6" opacity="0.6">
<path d="M24 40h40M30 34h30M96 40h36M98 34h26M44 62h72M52 70h56"/>
<path d="M112 30c6 2 10-4 16 0" />
</g>
</svg>
</section>
<style>
.dispatch {
position: relative;
padding: var(--space-m) var(--edge) var(--section-space);
overflow: clip;
}
.dispatch__meta {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: var(--space-xs) var(--gap);
font-size: var(--text-s);
font-weight: 300;
}
.dispatch__name,
.dispatch__place { font-weight: 600; }
.dispatch__date { color: var(--green); }
.dispatch__place { text-align: right; }
.dispatch__text {
position: relative;
z-index: 1;
max-width: 46rem;
margin: var(--space-l) auto 0;
font-size: var(--text-xl);
font-weight: 300;
line-height: 1.32;
letter-spacing: -0.01em;
text-align: center;
text-wrap: pretty;
}
.dispatch__word,
.dispatch__icon {
color: var(--ink-dim);
transition: color var(--quick) ease;
}
.dispatch__word.is-lit,
.dispatch__icon.is-lit { color: var(--ink); }
.dispatch__icon {
display: inline-block;
width: 1.15em;
height: 0.85em;
margin: 0 0.12em;
vertical-align: -0.08em;
fill: none;
stroke: currentColor;
stroke-width: 1.4;
stroke-linecap: round;
stroke-linejoin: round;
}
.dispatch__rail {
position: absolute;
top: 10rem;
right: var(--edge);
display: grid;
justify-items: center;
gap: 0.3rem;
color: var(--green);
font-size: var(--text-xs);
}
.dispatch__track {
position: relative;
width: 1px;
height: 9rem;
background: var(--ink-dim);
}
.dispatch__fill {
position: absolute;
inset: 0 -0.5px;
background: var(--green);
transform: scaleY(var(--read, 0));
transform-origin: top;
transition: transform var(--quick) linear;
}
.dispatch__boat {
position: absolute;
z-index: 2;
top: 38%;
left: 0;
width: clamp(5rem, 9vw, 8rem);
filter: drop-shadow(0 0.4rem 0.4rem var(--shade));
pointer-events: none;
animation: dispatch-drift var(--drift) ease-in-out infinite alternate;
}
.dispatch.is-offscreen .dispatch__boat { animation-play-state: paused; }
@keyframes dispatch-drift {
0% { translate: -20% -6rem; rotate: -14deg; }
30% { translate: 30vw 2rem; rotate: 8deg; }
60% { translate: 58vw -3rem; rotate: -6deg; }
100% { translate: calc(100vw - 9rem) 5rem; rotate: 16deg; }
}
@media (max-width: 48rem) {
.dispatch__meta { grid-template-columns: 1fr 1fr; }
.dispatch__subtitle { text-align: right; }
.dispatch__rail { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.dispatch__boat { animation: none; translate: 70vw 4rem; rotate: 8deg; }
}
</style>
<script>
(() => {
const formatDay = new Intl.DateTimeFormat('en-US', { dateStyle: 'long' });
const formatTime = new Intl.DateTimeFormat('en-US', { timeStyle: 'short' });
function splitIntoWords(text) {
for (const node of [...text.childNodes]) {
if (node.nodeType !== Node.TEXT_NODE) continue;
const pieces = node.textContent.split(/(\s+)/).filter(Boolean);
const words = pieces.map((piece) => {
if (/^\s+$/.test(piece)) return document.createTextNode(' ');
const word = document.createElement('span');
word.className = 'dispatch__word';
word.textContent = piece;
return word;
});
node.replaceWith(...words);
}
return [...text.querySelectorAll('.dispatch__word, .dispatch__icon')];
}
for (const root of document.querySelectorAll('.dispatch')) {
const text = root.querySelector('.dispatch__text');
const rail = root.querySelector('.dispatch__rail');
const date = root.querySelector('.dispatch__date');
const words = splitIntoWords(text);
let visible = false;
const now = new Date();
date.textContent = `${formatDay.format(now)}, ${formatTime.format(now)}`;
date.dateTime = now.toISOString();
const lightByScroll = () => {
const box = text.getBoundingClientRect();
const read = Math.min(Math.max((innerHeight * 0.8 - box.top) / box.height, 0), 1);
const litCount = Math.round(read * words.length);
words.forEach((word, index) => word.classList.toggle('is-lit', index < litCount));
rail.style.setProperty('--read', read.toFixed(3));
};
new IntersectionObserver(([entry]) => {
visible = entry.isIntersecting;
root.classList.toggle('is-offscreen', !visible);
if (visible) lightByScroll();
}).observe(root);
addEventListener('scroll', () => { if (visible) lightByScroll(); }, { passive: true });
addEventListener('resize', lightByScroll);
}
})();
</script>