Cork notice board
A grid of pinned paper notes on a cork board where every texture — cork speckle, timber frame, the 3D pushpin — is layered CSS gradients, with no image assets at all.
Reach for it when building
- community or team notice board
- playful task and bounty lists
- event and announcement walls
- kids or classroom interfaces
- game-styled quest boards
<div class="cnb-board" role="radiogroup" aria-label="Quest to track">
<label class="cnb-note">
<input class="cnb-pick" type="radio" name="cnb-quest" checked>
<b class="cnb-title">Clear the mill cellar</b>
<span class="cnb-text">Rats got into the flour again.</span>
<span class="cnb-reward">Reward: 40 gold</span>
</label>
<label class="cnb-note">
<input class="cnb-pick" type="radio" name="cnb-quest">
<b class="cnb-title">Escort the lute maker</b>
<span class="cnb-text">Two days up the north road to the harvest fair.</span>
<span class="cnb-reward">Reward: 120 gold</span>
</label>
<label class="cnb-note">
<input class="cnb-pick" type="radio" name="cnb-quest">
<b class="cnb-title">Find the lost hound</b>
<span class="cnb-text">Answers to Biscuit. Last seen by the old well.</span>
<span class="cnb-reward">Reward: a warm meal</span>
</label>
</div>Colors come from shared theme tokens — --surface, --ink, --border, --accent and friends — so this CSS carries no palette
of its own. Use Runnable file to copy the tokens along with it.
.cnb-board {
/* Materials that depend on ambient light: dark wood and a bright glint in
both themes, so each needs a different mix per theme. */
--cnb-timber: color-mix(in srgb, var(--warn) 55%, var(--ink));
--cnb-glint: var(--surface);
--cnb-shade: var(--ink);
display: grid;
grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
gap: 1.5rem;
padding: 1.5rem;
border: 6px solid var(--cnb-timber);
border-radius: 6px;
/* Cork is two radial speckle layers at different tile sizes — the phase
mismatch is what stops the repeat from reading as a grid — over a
two-stop tan gradient derived from the warning hue. */
background-image:
radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--ink) 12%, transparent) 0 2px, transparent 3px),
radial-gradient(circle at 70% 60%, color-mix(in srgb, var(--ink) 12%, transparent) 0 2px, transparent 3px),
linear-gradient(
180deg,
color-mix(in srgb, var(--warn) 32%, var(--surface-2)),
color-mix(in srgb, var(--warn) 45%, var(--surface-2))
);
background-size: 24px 24px, 31px 31px, auto;
box-shadow: inset 0 3px 12px color-mix(in srgb, var(--ink) 30%, transparent);
max-width: 680px;
}
[data-theme="dark"] .cnb-board {
--cnb-timber: color-mix(in srgb, var(--warn) 22%, var(--ground));
--cnb-glint: var(--ink);
--cnb-shade: var(--ground);
}
.cnb-note {
position: relative;
display: block;
background: linear-gradient(
180deg,
color-mix(in srgb, var(--warn) 6%, var(--surface)),
var(--surface)
);
color: var(--ink);
border-radius: 4px;
/* Extra top padding leaves room for the pin. */
padding: 1.5rem 0.75rem 0.75rem;
box-shadow: 0 4px 10px color-mix(in srgb, var(--ink) 30%, transparent);
overflow-wrap: anywhere;
cursor: pointer;
}
/* The radio stays in the accessibility tree and the tab order; only its
default drawing is hidden. The whole note is its label. */
.cnb-pick {
position: absolute;
width: 1px;
height: 1px;
margin: 0;
opacity: 0;
pointer-events: none;
}
.cnb-note:has(.cnb-pick:checked) {
box-shadow:
0 0 0 3px var(--signal),
0 6px 14px color-mix(in srgb, var(--ink) 35%, transparent);
}
.cnb-note:has(.cnb-pick:focus-visible) {
outline: 2px solid var(--ink);
outline-offset: 5px;
}
/* The pushpin: one radial gradient with an off-center highlight reads as a
sphere, and a small drop shadow lifts it off the paper. */
.cnb-note::before {
content: '';
position: absolute;
top: 8px;
left: 50%;
transform: translateX(-50%);
width: 13px;
height: 13px;
border-radius: 50%;
background: radial-gradient(
circle at 35% 30%,
var(--cnb-glint),
var(--bad) 55%,
color-mix(in srgb, var(--bad) 60%, var(--cnb-shade))
);
box-shadow: 0 2px 3px color-mix(in srgb, var(--ink) 45%, transparent);
}
.cnb-title { display: block; margin-bottom: 0.2rem; }
.cnb-text { display: block; margin-bottom: 0.4rem; color: var(--dim); }
.cnb-reward {
display: block;
color: color-mix(in srgb, var(--warn) 80%, var(--ink));
font-size: 0.875rem;
font-weight: 600;
}Paste this into an agent to rebuild the pattern from scratch.
Build a notice board of pinned paper notes where every material — cork, timber, paper, pushpin — is drawn with CSS gradients, and no image assets exist anywhere in the pattern.
The board is a responsive auto-fill grid (`minmax(11rem, 1fr)`, so it falls to one column on a phone) inside a thick timber frame, a 6px border in a wood tone. Cork texture is three stacked background layers: two `radial-gradient` speckle layers tiled at deliberately different `background-size` values (24px and 31px) so their phases never line up and the repeat stops reading as a grid, over a soft two-stop vertical tan gradient. An inset box-shadow sinks the board surface behind the frame.
Each note is a paper card with a faint warm-tinted vertical gradient, a small radius, and a real drop shadow. Note text is the body size; only the reward line is smaller. Give the note extra top padding, then draw the pushpin as a `::before`: a 13px circle whose entire three-dimensionality is one radial gradient with the highlight pulled off-center (`circle at 35% 30%`) running highlight, body color, shaded edge — plus a 2px drop shadow onto the paper. That single gradient is the pattern's showpiece; resist the urge to add more layers to it.
The board is a pick-one list with no script: the board is a `radiogroup` with an accessible name, each note is a `<label>` wrapping a visually hidden radio input, so clicking anywhere on the paper selects it, arrow keys move the selection, and assistive tech announces the checked state. Hide only the radio's drawing (1px, opacity 0), never `display: none`, or it leaves the tab order. The selected note (`:has(input:checked)`) gets a solid 3px ring via box-shadow in the signal color stacked over a slightly deeper drop shadow, never a border change that would shift layout. Keyboard focus (`:has(input:focus-visible)`) is a separate ink-colored outline offset outside that ring, so focus and selection can be told apart. If the notes are not selectable in your use, render a plain list and drop the radios and both rings.
Derive every material tone with color-mix from the theme's tokens (warm hue, ink, surface, ground) rather than hard-coded browns, so the board darkens plausibly in dark mode instead of glowing. Two materials cannot use one mix for both themes, because ink and surface swap lightness: the timber is the warm hue mixed toward ink in light mode and toward the page ground in dark mode, and the pin's highlight is the surface color in light mode and the ink color in dark mode, with the shaded edge mixed toward whichever of the two is dark. Put those behind per-theme custom properties. Check both themes: skeuomorphic patterns fail dark mode more often than flat ones, because their "materials" carry baked-in assumptions about ambient light.