| name | Pixiful | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| description | A bright sheet of pixel paper and a box of colours. A few quiet controls float above the artwork and show only what the moment needs. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| colors |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| typography |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rounded |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| spacing |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| components |
|
src/ui/styles.ts is the source of truth for every token. This page describes what ships after iteration 6.
Creative North Star: "Pixel paper and a box of colours"
The artwork is a bright sheet of pixel paper resting on a full-bleed neutral matte. A few near-opaque groups float above it: tools on the left, the palette at the bottom, the active tool's one main option at the top centre, the document top-left, panels and Export top-right, zoom bottom-right. Nothing is docked to an edge. The chrome is colourless, so the only colour on screen is the user's palette and their drawing, plus one blue that marks what is selected, focused, or the one action to take (and two signal colours used only as signals: green for a switch that is on, red for danger).
Two words decide every choice:
- Minimal means few controls at a time, not fewer features. Each moment shows what it needs. The rest is one step away and has a name and a one-line explanation when it appears.
- Immersive means the paper is the brightest and most important thing on screen in both themes. The chrome recedes while a stroke is in progress. Motion answers the person; the canvas itself never animates.
The tone is casual and friendly. The craft is professional: precise geometry, real contrast, no decoration.
Density is compact on fine pointers (13px type, 32px controls, 12px insets) and grows to 44px targets on coarse pointers. The same chrome runs full-window and inside a host's box down to 280x280. It adapts with container queries on the editor's own box and a measured layout, never viewport media queries, because the editor lives in someone else's page. Every token is a --pixiful- custom property on the host element, so integrators can retheme it without piercing the shadow root. Dark is the default theme; light and auto (follows the OS) are first-class.
The world refuses generic SaaS chrome: no cards on cards, no decorative gradients, no glass blur, no uppercase micro-labels, no Apple assets (the system font stack resolves to SF only where the OS provides it).
Key characteristics:
- Light paper in both themes: a soft two-tone checker (transparency) with a fine pixel grid once pixels are countable, and one soft shadow. No crop marks.
- A palette bar: the colour well and the palette's swatches are always on screen.
- Tool options in two levels: the bar shows the tool's name and one main option; "More options" opens a labelled popover.
- Floating capsules and a circular tool rail; panels, popovers and dialogs are solid sheets.
- One system-blue accent in two strengths. Export fills blue only once there is something to export.
- System font, 13px, hierarchy by weight (400/600), tabular numerals, sentence case, plain words.
- Lucide line icons at 1.75px stroke.
- Tooltips with a name, a shortcut and one plain line.
A near-achromatic chrome in which a single blue carries all meaning. The palette and the artwork supply all other colour.
- System Blue (indicator) (
accent, lightaccent-light): focus rings (2px outline), the selected-swatch ring, the current-frame ring, the drop-zone dash, the range-slider accent, the mirror guide lines on the canvas. Never behind text. - Deep System Blue (fill) (
accent-fill, hoveraccent-fill-hover): every filled "this is selected" state that carries white text or an icon: the active tool, the checked anchor cell, the hovered ruler column, and the primary button (Export once there is art, Save for hosts, a dialog's confirm). White on it clears AA (about 5.5:1). - Blue Tint (
accent-tint): the selected layer row, the current frame tile, the drop-zone wash, text selection.
- System Green (
success): the on-state of a switch. Nowhere else.
- System Red (
danger): error notices, inline error text, destructive actions.
- Matte (
matte): the full-bleed stage behind the paper; also the app background. - Paper (
check-a,check-b): the artboard's two checker tones. Light in both themes (dark theme#e4e4e9/#dbdbe1, light theme#ffffff/#f0f0f4), so a drawing looks the same in each and dark inks are always visible. Also behind layer thumbnails, frame tiles and the export preview. - Pixel Grid (
grid): hairlines between pixels once a pixel is at least about 6 screen px. - Floating Surface (
surface): capsule bars, tool rail, palette bar, zoom capsule, timeline. Near-opaque (94 to 95%), no blur. - Solid Sheet (
surface-solid): panels, popovers, menus, dialogs, notices, ruler strips, and the gap ring around the colour well. - Raised Segment (
seg-on): the selected segment of a segmented control. - Hairline (
border) and Separator (separator): 0.5px edges on floating groups and sheets; dividers in bars. - Fills (
fill,fill-2):fillfor pressed toggles, secondary buttons and the off-switch track;fill-2for fields, segmented tracks, preset chips and the export preview's stage. - State washes (
hover,press): hover (only where the device can hover) and press backgrounds on plain buttons. - Labels (
label,label-2,label-3): primary text; secondary text (hints, explanations, captions); disabled controls. - Tooltip (
tip,on-tip): a solid plate darker or lighter than the surface, so it reads as a different layer. - Artboard Shadow (
artboard-shadow): the single canvas-drawn shadow under the paper.
The One Blue Rule. Blue means selected, focused, or the one primary action, and nothing else.
The Signal Colour Rule. Green appears only on a switch that is on; red only for danger and errors.
The Colourless Chrome Rule. The matte and surfaces stay neutral grey. The only chroma in the chrome is the user's own palette in the palette bar.
The Same Paper Rule. The paper is light in both themes. Never darken it to match a dark theme: the drawing must look the same everywhere.
Body font: the system stack (-apple-system, SF Pro Text, system-ui, Segoe UI Variable Text, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif). No font is shipped. Numerals are tabular everywhere.
- Title (600, 15px, 20px): dialog titles only.
- Label (600, 13px, 18px): the tool name in the options bar and popover, the document title, labelled buttons, panel titles, stepper values.
- Body (400, 13px, 18px): controls, menu items, field text, hints. Option labels and layer names step to 500.
- Label Small (600, 12px): the zoom readout, section titles, shortcut-sheet group headings, tooltip names.
- Caption (400, 11 to 12px, 14 to 16px): option explanations, tooltip descriptions, layer sub-lines, frame numbers.
The Weight-Not-Size Rule. Hierarchy comes from weight and label tier within an 11 to 15px band.
The Sentence Case Rule. Every label, title and menu item is sentence case.
The Plain Words Rule. Labels use everyday words: "Clean lines", "Mirror left–right", "This area / Everywhere", "Box / Same colour", "New drawing", "Hide controls". A technical term may follow in the explanation ("pixel-perfect"), never lead. Zoom and export size use the same word: a multiplier ("20×", "8×").
Canvas first: the stage fills the host and the paper is fitted into the room the chrome leaves, placed among the floating groups rather than inside bands cut off each edge. It keeps the same 12px from the host edge as the groups and 8px from each group, and takes the largest whole zoom (whole CSS pixels on whole-ratio screens; exact below 1×) that sits as near the centre as it can. A group that opens clear of the paper (Layers beside it) leaves it exactly where it was; the tool-options row is reserved whole, so switching tools never moves it. On compact hosts the Layers sheet is dodged too, unless that would shrink the paper below half its zoom or 128px, when the sheet covers it in place. Floating groups sit 12px from the host edge.
Wide hosts (more than 640px):
- Top-left capsule: Document (title, unsaved dot, chevron). Undo and Redo join it with the first edit and then stay.
- Top-centre capsule: the active tool's name, its main option, any option that is switched on, and More options. When it would touch a side capsule it slides along the top row, as near the centre as it fits.
- Top-right capsule: Animate, Layers, separator, Export, Save (hosts only).
- Left, vertically centred: the tool rail (seven circular tools, one rule between the drawing tools and the rest).
- Bottom centre: the palette bar (colour well, up to twelve swatches, more by scrolling). It sits under the middle of the paper and keeps clear of the rail and the zoom capsule. With the timeline open the two share the bottom row when both fit (colours on the left, the timeline on the right, the pair centred together under the paper); otherwise the palette bar sits above the timeline, both centred on the same line (nudged only as far as the wider timeline needs).
- Bottom-right: zoom capsule (minus, multiplier, plus). Fit shows in it while the view is not the fitted one, and goes again after a fit. The pointer position joins it while rulers are on.
- Layers opens below the top-right capsule, 208px wide (288px on touch, where Hide and Lock stay on screen beside a larger thumbnail): wide enough for most layer names ("Character outline" fits whole). It has no close button; the Layers button closes it. Its header and opacity row are as tall as a bar. Each row is a frame tile's thumbnail with 2px around it (40px); with a mouse, Hide and Lock show while the pointer or focus is on the row, or while they are switched on (always on touch). A name too long for its room fades out at its end, like the swatch strip. The timeline is a capsule at the bottom centre, exactly as tall as the palette bar.
- Hosts under 460px tall (520px with the timeline): the palette bar steps back and the colour well joins the rail.
Compact hosts (640px or less): a bottom stack, bottom to top:
- The timeline, when open.
- The palette row: colour well, a scrolling swatch strip, the Options button.
- The tool dock.
- Selection actions, only while a selection is active.
Tool options stay in the top row, between the side capsules, whenever they fit there (with labels, else icons only); the Options button then steps back. Only when the top row has no room do they open from the Options button.
When two rows would squeeze the paper, or the dock would wrap, the dock shows only the current tool (pressing it opens all tools) and shares one row with the palette. Zoom moves under the top bars and hides on phones and tiny hosts (pinch and the Document menu cover it).
Measured rules, in order: side groups shed secondary buttons into the Document menu when they would collide (tight to tiniest); the options capsule slides along the top row, then shows icons only there, then drops to a second row (ctx-below), then shows icons only (ctx-icons), then collapses to one Options button (ctx-collapsed) on wide-but-short hosts.
Chrome modes for hosts: minimal hides the top bars (the options, rail and palette stay), none hides all floating chrome. "Hide controls" (F) leaves only a "Show controls" capsule.
Coarse pointers raise controls and tools to 44px, palette-bar swatches to 44px targets with 30px dots, menu rows to 44px.
The chrome floats on soft two-layer ambient shadows and a 0.5px hairline. The canvas carries one soft drawn shadow that makes the paper read as a sheet on the matte. There is no backdrop blur. prefers-reduced-transparency and prefers-contrast: more swap every surface to its solid value; high contrast also strengthens borders and raises label-2 to label.
- Float (
--pixiful-shadow): every floating group, notice and tooltip. - Pop (
--pixiful-shadow-pop): popovers, menus and dialogs. - Artboard (canvas shadow, blur 36px, offset-y 10px,
artboard-shadow): the paper's single resting shadow. - Raised segment: the selected segment of a segmented control.
- Swatch ring (
--pixiful-swatch-ring): a hairline that keeps any swatch colour visible on any surface; selection adds a 2px surface gap and a 4px accent ring.
The Near-Opaque Rule. Floating groups are 94 to 95% opaque with no blur; sheets are solid.
The Recede Rule. While a stroke is in progress, all floating chrome fades to 50% and stops taking pointer events.
Round, concentric geometry. Bars, the palette bar, the zoom capsule, notices and every button inside a bar are capsules. Tool buttons, the colour well and swatches are circles. Sheets step up with size: controls 8px, rows and tooltips 10px, the export stage 12px, panels and popovers 14px, dialogs 16px. The timeline is a capsule like the palette bar. Every bar is equally thick: each horizontal bar (document, tool options, panels and Export, colours, timeline, zoom, the compact dock) is one control plus 12px tall (44px, 56px on touch), and the vertical tool rail is exactly that wide. Only the Layers panel is larger. Nested shapes are concentric. Edges are 0.5px hairlines.
Motion answers the person and then stops. All of it is off under prefers-reduced-motion.
- Press: icon buttons, tools, segments, the well and frame tiles scale to 0.92 while pressed (140ms).
- Pop: the icon of a newly active tool, a picked swatch and the colour well when its colour changes scale to 1.22 and back (300ms).
- Settle: panels, popovers, menus and dialogs fade and scale in from 0.96 with a small overshoot (
--pixiful-spring, 200ms). A switch thumb slides with the same curve. - Breathe: the first-run cue under the paper dims twice, then rests. It is fully visible from the first frame.
- Recede: the chrome fades while drawing (see the Recede Rule).
- Export's change from plain to filled blue takes 320ms.
The Still Canvas Rule. Painting, tool switches on the canvas and zoom never animate. Every pixel lands at once.
- Primary: deep blue fill, white 600 text, capsule. One per context.
- Secondary:
fillbackground, capsule. Dialog cancel and "Copy image". - Plain / icon: transparent, 32px; hover wash, press wash,
fillwhen pressed on. - Focus: 2px
accentoutline.
A vertical floating capsule, 6px padding, 4px gap; 40px circular tools with 21px icons. The selected tool fills deep blue. On compact hosts it is a horizontal dock.
- Colour well: a 40px button showing the main colour as a large circle with the second colour tucked behind it. It opens the colour popover.
- Swatch strip: the document palette in order. Each swatch is a 30px-wide target with a 22px dot (44 / 30 on touch). The current colour carries the accent ring. Click picks the main colour; right-click picks the second colour. The strip is a listbox with one tab stop. Where it continues off the edge it fades.
- Options button (compact hosts only): opens the tool options popover.
- The default palette is ordered like a box of crayons: twelve basics first, then twelve shades.
- Bar: tool name (600), separator, the main option (size stepper, shape or mode segments), a chip for each mirror that is on, selection actions when a selection exists, and More options. Clean lines is on by default and lives in the popover only.
- Popover: the tool name, then every option as a row. Steppers and segments sit to the right of a 500-weight label. On/off options are switch rows: label, one explanation line in
label-2, and a 38x22 switch (filloff,successon). - A selection adds its actions (flip, rotate, crop, erase, Deselect, Done) to whatever tool is active.
A solid plate (tip), 10px radius, 12px text: name in 600, the shortcut dimmed, and one plain line below. It shows after a 500ms hover (80ms when moving along a toolbar) or at once on keyboard focus, beside the rail's tools and below or above everything else. Touch has no tooltips; every control keeps its accessible name. No native title attributes remain on controls.
- Segmented:
fill-2track, 2px padding; the checked segment rises onseg-on. - Field: borderless,
fill-2background, 8px radius, 32px tall, tabular numerals. Selects get a 16px chevron. - Range: native slider with the indicator blue.
surface-solid, 14px radius, float shadow. Rows are 52px with a 38px thumbnail on paper, a name and a caption. The selected row takes the blue tint.
A floating capsule as tall as the palette bar (44px, 56px on touch), with transport icons, frame tiles and a frame-time field. A frame tile is its thumbnail edge to edge, 4px taller than a control (36px, 48px on touch), with the frame number on a small dark badge in the bottom-left corner, which reads on any thumbnail. The current frame gets a 2px blue ring, and its badge turns the same blue and tucks into the ring's corner; the frame on screen during playback gets an outline. Onion skin is off by default; when the user turns it on (O, the timeline button or the View menu) it is drawn under the current frame, so the frame being drawn keeps its true colours.
- Popover:
surface-solid, 14px radius, pop shadow, anchored to its control. The colour popover opens above the well; kept open (pinned), it steps aside into the matte beside the paper when there is room. - Menu rows: 30px (44px coarse), 18px icon, right-aligned shortcut text; hover and focus fill the row deep blue.
- Document menu: shows only what is not already on screen. Undo, Redo, Show layers and Show timeline appear when their buttons are hidden; Fit and View options appear when the whole zoom capsule is hidden. A menu taller than its host scrolls, with a soft shadow at the edge it continues past.
Sheet-like, surface-solid, 16px radius, pop shadow, up to 420px inside a scrim local to the editor host. Rows: a label-2 label (min 64px) then the control. Actions are capsules, right-aligned, wrapping on narrow hosts.
- Export: a preview on a
fill-2stage (this frame, the animation playing, or the whole sheet), a size segment (1×, 2×, 4×, 8×, Custom) that starts at the largest size within 512px, the resulting pixel size, and the file name.
Main and second colour targets, swap, keep open; the palette grid; a 132px saturation/value field, hue and opacity strips, a preview chip and a hex field.
A capsule on surface-solid below the top bars; errors turn the text danger.
- Paper: the checker and grid described above, with the artboard shadow.
- Brush preview: the next stroke's pixels at 85% opacity with a two-tone outline.
- Mirror guides: dashed accent lines on the axes while a mirror is on.
- Selection: a two-tone marching outline.
- Rulers (off by default):
surface-solidstrips withlabel-3numerals; the hovered column and row fill deep blue.
Lucide (ISC), vendored: 24-unit grid, 1.75px stroke, round caps and joins. One icon is authored for this project on the same grid: filled (a solid rounded square for the Filled option).
- Do keep the paper light in both themes and the brightest surface on screen.
- Do show one main option per tool in the bar, and give every other option a label and one plain line in the popover.
- Do show a mirror in the bar while it is on, so a setting that changes every stroke is never out of sight.
- Do show in menus only what is not already on screen.
- Do let a control arrive when it has something to do: Undo and Redo after the first edit (they then stay), Fit while the view is not fitted.
- Do use
accentfor rings and indicators andaccent-fillfor filled states that carry text or an icon. - Do give every control a
data-tip(name, shortcut, one plain line) and an accessible name. - Do adapt with container queries and measurement on the editor's box.
- Do expose any new colour, size or radius as a
--pixiful-custom property with dark, light and auto values. - Do set every duration to 0 under reduced motion.
- Don't darken the paper for the dark theme, or tint the chrome toward a hue.
- Don't show a control to someone who has not drawn yet unless they need it to draw.
- Don't use tool jargon as a label when a plain word exists.
- Don't use green or red for anything but the switch on-state and danger.
- Don't add backdrop blur, glass effects or decorative gradients.
- Don't dock panels or toolbars to the host edges.
- Don't animate painting, the canvas or zoom.
- Don't make visibility depend on an animation having run: every element is visible in its resting state.
- Don't add native
titletooltips; usedata-tip. - Don't ship Apple assets; rely on the system stack and Lucide.
- Don't smooth pixels: thumbnails, tiles and previews render with
image-rendering: pixelated.