Sprout

SproutPixel-prop kit

A UI kit in which every control is a small physical prop: buttons are baked pieces, sliders are planks, headings are painted signs. Everything is drawn on a 3px pixel grid, and there is not one smooth curve in it.

Two things to hold on to. Everything is a whole number of units - size, corner, edge, bevel, gap and every step of motion is an integer multiple of --px, so the kit rescales by changing one value. And pieces are objects, not paint: at night the ground goes dark but a piece keeps its baked colour, dimmed as if lamplit. It never inverts.

3PXone unit
22colour roles
0radii

Read this first

  1. These values are the system. Every token below is declared in css/sprout-core.css. Use them; do not invent parallel ones.
  2. Search for an existing piece before building a second one. A new control is almost always an existing shell, face and bevel with a different label.
  3. Whole units only. Every size is calc(n * var(--px)) with a whole n. No raw hex, no half units, no one-off pixel sizes.
  4. No border-radius, anywhere. Corners are clip-path staircases. A single rounded corner breaks the illusion for the whole page.
  5. Token names are roles. --piece is the face of a control, not "a beige". Read what a token is for before reaching for it.
  6. Motion is steps() only. Nothing eases, fades or blurs. If it moves, it jumps.
Section 01

Colour

Twenty-two role tokens in six families. Every packet shows day on the left and night on the right, so both themes are always in view. Click a packet to copy its var().

Ground · the board

Piece · the raised face

Alt · the counter-piece

Ink · on pieces and sheets

Accent · the living signal

Disabled · an unbaked piece

Focus

Contrast floor · measured, day / night

PairDayNightRule
--ink on --piece5.0:15.9:1The standard text pair: every button label.
--ink on --piece-hi6.0:17.3:1Text on a sheet: panels, fields, packets.
--ink-soft on --piece-hi4.6:14.9:1Placeholders. Sheet face only - on --piece it would drop under 4.5.
--ground-ink on --ground6.1:113.0:1All small text on the board.
--ground-ink on --ground-inset5.0:114.1:1Captions and tables on a plate.
--glint on --alt7.0:14.9:1Labels on a secondary button.
--glint on --accent2.0:13.7:1Large display only. Sign text is 20px bold and up; small text never sits on green.
--alt on --ground4.1:13.2:1Tracks, dashes and the focus ring clear 3:1 against the board.
--focus on --piece-hi6.0:13.5:1The ring stays visible when it sits on a sheet.
--disabled-ink on --disabled2.3:12.7:1Deliberately faint. A disabled piece is exempt, and should look it.

Why two inks

Text on a piece and text on the ground look like one colour by day, and the kit could have used one token for both. It does not, because at night they have to part ways: the ground goes dark and needs a light ink, while the pieces stay lamplit and keep a dark one. --ink and --ground-ink are the same idea on two different surfaces, and naming them separately is what lets night exist without a single exception in the component CSS.

The same reasoning split --alt from --ink: by day both are one cocoa, but a track has to clear 3:1 against a dark board and a lamplit sheet at once, and a text ink does not.

Section 02

Typography

Two voices. A pixel face, always uppercase, for everything a prop would have painted on it; a plain system sans for anything a person has to read in sentences. Every size below is rendered at its real size.

--fs-hero · 40pxHero sign
--fs-title · 30pxTitle line
--fs-heading · 20pxSection heading
--fs-label · 15pxButton label
--fs-caption · 10pxCaption · row label · 6 of 8
--fs-body · 14px

Body copy is a plain system sans so paragraphs stay easy on the eyes; the pixel voice is saved for labels and signs. On the ground, body text takes --ground-ink; on a sheet it takes --ink.

--font-code · 13px--piece-hi: #f6ead0;

Type tokens

TokenValueFaceWhere
--fs-hero40px / 700--font-pixelThe big sign. One per page.
--fs-title30px / 700--font-pixelThe big sign on a phone; large figures.
--fs-heading20px / 700--font-pixelSign faces, the large button.
--fs-label15px--font-pixelButton labels, panel titles.
--fs-caption10px--font-pixelCaptions, row labels, tooltips, check text. The floor.
--fs-body14px / 1.6--font-bodyRunning text and inputs.
--font-pixel"Silkscreen", monospacedisplaySIL Open Font License, loaded by URL. Uppercase always.
--font-bodysystem-ui stackbodyNothing to download.
--font-codeui-monospace stackcodeToken names in documentation. Never on a prop.

Why the split is by length

The pixel face is paint on a prop. At label length it reads as something lettered onto the object; stretched across a paragraph it becomes tiring, because every glyph is a block of squares. So the rule is decided by length, not by importance: a label, a title, a caption goes pixel; anything a reader has to follow across more than a line goes to the body face, however important it is.

Display sizes are fixed px and run 10, 15, 20, 30, 40, never a rem: a painted label is part of the piece it sits on, and the piece is sized in units, not by the reader's text setting.

Section 03

Space and layout

One unit, --px: 3px, and every distance is a whole multiple of it. The scale is not a list of chosen sizes but the multiples the kit actually uses, each with a job.

UnitsAt 1xBarWhere
1u3pxEvery edge, every bevel, the pressed drop, the D-pad gap.
2u6pxGap between a control's parts: dashes, stepper and rail, seed dots.
3u9pxButton face, vertical padding; checkbox to its label.
4u12pxBetween an icon, a label and a toggle in a row.
5u15pxButton face, horizontal padding; sign face, horizontal padding.
6u18pxPlate and panel padding.
8u24pxBetween specimens on a plate.
10u30pxHeadroom above a sign, so the tendrils have somewhere to grow.
22u66pxBetween sections.

Measures and breakpoint

MeasureValueNote
page1120pxContent ceiling, centred on the board.
reading640pxLedes and running text never run wider.
panel720pxThe widest a sheet of prose gets.
gutter20px / 16pxSide margin; the second value applies under the breakpoint.
breakpoint720pxThe one breakpoint. Below it the hero sign drops to --fs-title and plates tighten from 6u to 4u.

Why one unit

Because it makes the whole kit scale as a single object. Set --px: 6px on any wrapper and the geometry inside doubles - corners, edges, bevels, gaps and sprites together - and still lands on the grid. Only the painted labels hold their size, since type is set in fixed pixels. A kit with a free-form spacing scale cannot do that: its 10px gap and its 3px edge would drift out of step the moment either was scaled. The Form section below shows the same button at 1x and 2x.

Section 04

Form

The silhouette is three layers. An outer layer in the edge colour, clipped to a staircase and padded by one unit; a face inside it, clipped to the same staircase; and a one-unit bevel on the face - light above, dark below. Press a piece and the bevel goes while the label drops exactly one unit.

Anatomy · one button at 1x and 2x, its corner at 4x

1x · --px: 3px
2x · --px: 6px
4x corner · two steps of one unit
  • edge · 1 unit
  • top bevel · 1 unit
  • face
  • bottom bevel · 1 unit

Form values

PartValueWhat it does
--c1 / --c21u / 2uThe standard staircase: the corner steps two units in, one unit per step.
.spr-clip-lg2u / 4uThe same two-step staircase at double stride, for plates, panels, the big sign and stages.
--clip-px20-point polygonThe staircase itself, driven by --c1 and --c2. Rescope those two to resize the corner.
edge1uAn outer element in --piece-edge with padding: var(--px). Not a border - a border cannot follow a staircase.
bevel1u + 1uTwo inset shadows on the face: --piece-hi above, --piece-lo below. Zero blur, always.
shade2u bottomSigns and panels carry one extra unit of edge at the bottom: the object's weight.
pressedbevel off, 1u downThe piece is pushed flat. Content moves, the outline does not.
border-radiusnoneNot a small value. Absent.

Why layers and not borders

A CSS border is drawn along the element's box and then cut by the clip-path, so at every stepped corner the border is sliced off and the outline opens. An outer layer clipped to the same staircase has no box edge to lose: the edge is simply the one unit of outer colour left showing around the face, and it follows every step. The same reason puts the focus ring on an unclipped wrapper - a clip-path would cut the ring away too.

Section 05

Motion

Toy motion. Things jump between whole positions and never pass through the space between them. Flip the toggle and watch the knob hop; the tendrils on every sign sway one unit each way.

hop · 2 steps
press · instant
Sway
sway · 1 unit, 2 holds

Motion values

TokenValueWhere
press0sBevel off, content down 1u. No transition at all.
--t-hop0.2s steps(2)The toggle knob: two jumps across ten units, never a slide.
--t-sway2.6s per holdTendrils: one unit left for 2.6s, one unit right for 2.6s, steps(1). The right tendril runs one hold behind the left.
tooltipdisplay swapA hover tip appears whole. No fade, no rise.
reducedprefers-reduced-motionThe sway stops and the knob jumps without its two steps. State changes stay instant, so nothing is lost.

Why steps and not easing

An eased transition renders every in-between position, and on a kit drawn in 3px squares the in-betweens land between squares - for a frame or two the art is blurred. steps() only ever shows positions on the grid, so the illusion holds while things move. The sway is written as explicit holds rather than alternate for a practical reason: a one-step timing played in reverse never leaves its first frame, and an alternating sway silently stands still.

Section 06

Screen

One optional surface treatment: a furrow field. The board resolves into whole cells in mown stripes, with a few tufts flicking on a slow tick. Move across the right-hand panel and rings of cells lift in a pixel diamond around the pointer, travelling outward one whole cell per tick.

Static fallback · mown stripes
Live · move the pointer across it

Uniforms

UniformValueWhat it does
uCell12px (4u)Cell size, rounded to whole device pixels. Every decision in the shader is made per cell, so nothing finer than a cell can appear.
uStep8 per secondThe only clock: a whole tick count. Time in the shader never has a fraction.
uStripe4 cellsWidth of a mown stripe - 16u, the same stripe the fallback draws in CSS.
uGap3 cellsSpacing between ripple rings. The front sits where distance minus tick is a multiple of the gap.
uReach10 cellsHow far the rings run at full engagement. It grows and shrinks one whole ring at a time as the pointer enters and leaves.
uTuft0.045Share of cells carrying a tuft, each flicking on its own phase of an eight-tick cycle.
uGround, uInset, uAccent, uAccentLo, uGlinttokensRead from the live values and re-read on every theme change. The glint cell marks the pointer.
springk 58 / d 9The ripple's centre follows the pointer on a spring, then snaps to a whole cell - weight in the motion, no smear in the drawing.

Why it cannot blend

The kit refuses gradients, and the shader makes that refusal structural rather than a matter of care. Each cell picks one of five token colours and never mixes two: there is no fractional weight anywhere in it. Space is quantised to the cell and time to the tick, so the field moves the way the rest of the kit moves - in steps. It also only redraws when a whole step changes: a new tick, a new cell under the pointer, a ring gained or lost.

Enhancement only. The canvas is transparent until its first frame, so a machine without WebGL2 sees the static stripes on the left and loses nothing. It stops when scrolled off screen, and under prefers-reduced-motion it draws one settled frame and never starts a loop.

Where it belongs: an empty state, a title screen, the frame around a hero sign - a place with nothing to read. Not behind body text or controls: a moving checker under a label costs the contrast the Colour section measured, and a ripple under a button reads as the button doing something it is not.

Section 07

Components

Every piece here is a real control - press it, drag it, tab through it. Focus is a 2px --focus ring around the whole prop. The one row of pinned states exists only so hover and pressed can be compared side by side; everything else is live.

Button · pinned for comparison: rest, hover, pressed, disabled

Label Label Label Label

Buttons · live

small
default
large
alt
disabled
icon squares
D-pad · alt icon squares

Toggles, checks, seed dots

toggle · on / off / disabled
checkbox · on / off / disabled
Choose one
radio · seed dots
pagination · a planted row

Sliders and segment bar · wired together

drag the plank, the dashes follow
vertical

Tooltips and field

Always shown
tooltip · pinned
Shown on hover
tooltip · hover or focus
input · ink caret

Panel · sheet, title, rows, close

Panel title

Sound

Music

Flip a toggle: the row swaps its sprite for the muted one. The close button docks two units in from the corner, on top of the edge.

Sprites · 16-cell and 8-cell grids

speaker
muted
note
note muted
check
cross
arrow
seed
sprout
plus cursor
pointer

Why every control is three spans deep

Shell, face, content. The shell carries the edge, the face carries the bevel, and the content is what moves when the piece is pressed - so the outline stays put while the label drops a unit, the way a real key would. Collapse the layers into one element and one of those three jobs has nowhere to live. The real input is always present and only visually hidden, so every toggle, check and seed dot is keyboard and screen-reader native.

Section 08

Motifs

What makes the kit recognisable at a glance, before a single colour is read. Two ways of laying pixels - stacked box-shadows and integer SVG rects - and a handful of shapes that recur everywhere.

Staircase corner. Two steps, never a curve.

Sign

Painted sign. Accent face, glint rim, accent-lo edge and shade, two tendrils.

Tip

Stepped tail. One cell plus stacked box-shadow pixels, shown at 4x.

Rect-art sprite. Integer rects, crispEdges, 16 cells.

Seed dot. Two-tone: outline in color, meat in --seed-meat.

Segment dash. Filled or outlined, nothing in between.

Why these, and not the palette

Recolour the kit and it is still recognisable, because the staircase, the one-unit bevel and the rect-art are doing the identifying. That is also why night was possible without redrawing anything: every motif is geometry plus role tokens, and the geometry does not care which theme it is standing in. Before adding a motif, check that it is made of whole units and at most one bevel.

Section 09

Composition

The pieces assembled into one neutral dialog: a sign overlapping a sheet, a list to choose from, an amount, an option and two actions. Pick a row, set the amount, and the confirm label keeps count. The copy is placeholder, so what you take away is the arrangement.

Dialog title

Amount
3 of 10

Anatomy

PartAs builtWhy it is that
Sign-5u overlapThe heading sits on the sheet's top edge, not above it, so it reads as a label nailed to the object rather than a caption floating near it.
Sheet--piece-hi, 6u padThe lightest face in the kit, so the pieces laid on it - rows, buttons, the rail - still read as raised.
Rows1u --piece ruleDivided by a one-unit line in the piece colour: visible, but quieter than any edge.
Levelsegment + valueThe dashes are a picture of the number, and the number stays beside them. On a phone the dashes go and the number carries it alone.
Actionsalt, then pieceThe way back is the dark counter-piece; the way forward is the lighter, raised one. The eye lands on the lighter piece first.
Close2u in from the cornerDocked over the edge, inside the staircase - it belongs to the sheet, not to the page.

Why it says nothing

Item one, item two, an amount, confirm. Those words were chosen because they imply nothing about what the kit is for. The same arrangement is a settings sheet, an order form, a level select or a file picker, and a reader in any of those fields should be able to lift it whole.

Section 10

Rules

The refusals matter more than the permissions.

Do

  • Build every size as whole units of --px.
  • Draw corners with the staircase clip, and edges as an outer layer.
  • Give depth with a one-unit bevel, and take it away when pressed.
  • Use flat fills and chunky rect-art with crispEdges.
  • Put small text on the ground in --ground-ink, and on a piece in --ink.
  • Check both themes with the Day / night button in the masthead.

Do not

  • Use border-radius, or any smooth curve.
  • Add a gradient, a blur, or a shadow with any blur radius.
  • Ease anything. Motion is steps() only.
  • Set small text in --piece-edge, or small glint text on the accent.
  • Invert a piece for night. The ground goes dark; the piece is lamplit.
  • Run the furrow field behind text or controls.
  • Size the pixel face in rem or in-between steps. It runs 10, 15, 20, 30, 40.