Numbered services
Four services with name, grey two-line blurb and number between hairline rules, in the left third of the page. Rows and rules fade in with their place on screen; hover draws a black rule and nudges the number in blue.
Part of the style
Quiet Page, Loud Work
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/quiet-page-loud-work/services/figma.html?palette=daab239504fce080
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/quiet-page-loud-work/services/figma.html?palette=daab239504fce080 and pass that whole HTML document to the html_to_figma tool, so the part "Numbered services" 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 {
--paper: #20201f;
--ink: #f8e2c6;
--ink-head: #c4b39e;
--grey: #848477;
--rule: #393935;
--frame: #f8e2c6;
--pic-white: #20201f;
--accent: #847a6d;
--pic-violet: #635c53;
--pic-pink: #6c6256;
--pic-pink-deep: #665d51;
--pic-green: #6c6256;
--pic-green-deep: #4c453d;
--accent-2: #6c6256;
--pic-yellow: #6a6054;
--pic-orange: #675d51;
--pic-teal: #6c6256;
--pic-teal-deep: #484138;
}
</style>
<section class="services" aria-labelledby="services-title">
<div class="services__block">
<h2 class="services__title" id="services-title">Things we do</h2>
<ol class="services__list">
<li class="services__row">
<a class="services__link" href="#">
<span class="services__main">
<span class="services__name">Art direction</span>
<span class="services__blurb">One loud idea per brand,<br />held steady across every page</span>
</span>
<span class="services__num">01</span>
<span class="services__line" aria-hidden="true"></span>
</a>
</li>
<li class="services__row">
<a class="services__link" href="#">
<span class="services__main">
<span class="services__name">Web design</span>
<span class="services__blurb">Calm layouts that leave<br />room for the pictures</span>
</span>
<span class="services__num">02</span>
<span class="services__line" aria-hidden="true"></span>
</a>
</li>
<li class="services__row">
<a class="services__link" href="#">
<span class="services__main">
<span class="services__name">Illustration</span>
<span class="services__blurb">Characters, maps and lettering<br />drawn for the screen</span>
</span>
<span class="services__num">03</span>
<span class="services__line" aria-hidden="true"></span>
</a>
</li>
<li class="services__row">
<a class="services__link" href="#">
<span class="services__main">
<span class="services__name">Web development</span>
<span class="services__blurb">Fast, accessible builds<br />you can edit yourself</span>
</span>
<span class="services__num">04</span>
<span class="services__line" aria-hidden="true"></span>
</a>
</li>
</ol>
<a class="services__more" href="#">
<span>Learn more</span>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M1 8h14M9 2l6 6-6 6" /></svg>
</a>
</div>
</section>
<style>
.services {
display: grid;
grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
padding: var(--section-pad) var(--edge);
}
.services__block {
grid-column: 1 / span 2;
display: grid;
gap: var(--gap-l);
justify-items: start;
}
.services__title {
margin: 0;
font-size: var(--text-h2);
font-weight: var(--weight-head);
line-height: var(--lead-head);
letter-spacing: var(--track-head);
text-transform: uppercase;
}
.services__list {
width: 100%;
margin: 0;
padding: 0;
list-style: none;
border-top: var(--hair) solid var(--rule);
}
/* Each row, rule included, fades with its place on screen: rows low in the view are faint, rows above are solid. */
.services__row {
opacity: var(--seen, 1);
border-bottom: var(--hair) solid var(--rule);
}
.services__link {
position: relative;
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 16px;
padding: var(--row-pad) 0;
color: var(--ink);
text-decoration: none;
}
.services__link:focus-visible {
outline: var(--hair) solid var(--accent);
outline-offset: 2px;
}
.services__main {
display: grid;
gap: 3px;
}
.services__name,
.services__num {
font-size: var(--text-l);
line-height: var(--lead-text);
}
.services__blurb {
color: var(--grey);
font-size: var(--text-xs);
line-height: var(--lead-text);
}
.services__num {
transition: transform var(--t-arrow) var(--ease-out), color var(--t-arrow) var(--ease-out);
}
.services__line {
position: absolute;
left: 0;
right: 0;
bottom: calc(var(--hair) * -1);
height: var(--hair);
background: var(--ink);
transform: scaleX(0);
transform-origin: left;
transition: transform var(--t-line) var(--ease-out);
}
.services__link:hover .services__line,
.services__link:focus-visible .services__line { transform: scaleX(1); }
.services__link:hover .services__num,
.services__link:focus-visible .services__num {
color: var(--accent);
transform: translateX(-6px);
}
.services__more {
display: inline-flex;
align-items: center;
gap: 40px;
min-height: var(--tap);
border-bottom: var(--hair) solid var(--ink);
color: var(--ink);
font-size: var(--text-m);
text-transform: uppercase;
text-decoration: none;
}
.services__more svg {
width: 16px;
height: 16px;
fill: none;
stroke: currentColor;
stroke-width: 1.2;
transition: transform var(--t-arrow) var(--ease-out), color var(--t-arrow) var(--ease-out);
}
.services__more:hover svg,
.services__more:focus-visible svg {
color: var(--accent);
transform: translateX(6px);
}
@media (max-width: 63.99rem) {
.services__block { grid-column: 1 / span 3; }
}
@media (max-width: 47.99rem) {
.services { grid-template-columns: minmax(0, 1fr); }
.services__block { grid-column: 1; }
}
</style>
<script>
(() => {
const FADE_FROM = 0.95;
const FADE_TO = 0.7;
const FAINTEST = 0.12;
const reduced = matchMedia("(prefers-reduced-motion: reduce)").matches;
const fadeByPlace = (rows) => {
const view = innerHeight;
for (const row of rows) {
const top = row.getBoundingClientRect().top;
const progress = (view * FADE_FROM - top) / (view * (FADE_FROM - FADE_TO));
const opacity = Math.min(1, Math.max(FAINTEST, progress));
row.style.setProperty("--seen", opacity.toFixed(3));
}
};
for (const root of document.querySelectorAll(".services")) {
if (reduced) continue;
const rows = [...root.querySelectorAll(".services__row")];
let frame = 0;
const schedule = () => {
if (frame) return;
frame = requestAnimationFrame(() => {
frame = 0;
fadeByPlace(rows);
});
};
const watcher = new IntersectionObserver(([entry]) => {
if (entry.isIntersecting) {
addEventListener("scroll", schedule, { passive: true });
addEventListener("resize", schedule);
schedule();
} else {
removeEventListener("scroll", schedule);
removeEventListener("resize", schedule);
}
});
watcher.observe(root);
}
})();
</script>