Stackyard design system
Stackyard follows Apple’s Human Interface Guidelines for type, spacing, controls and motion. This page covers only what is specific to Stackyard. Tokens live in ui/css/tokens.css.
Colour
Section titled “Colour”Teal is the brand accent. Rules name a role below, never a raw colour.
Dark theme
Light theme
The other hues and greys are Apple’s system colours.
What differs from the guidelines
Section titled “What differs from the guidelines”- Both pages carry both themes. Display Mode sets the theme on
<html>, and the dashboard, the Settings pages and every widget follow it. - Text on cards uses
--sy-a11y-dim. Apple’s secondary label colours fail WCAG contrast on Stackyard’s cards. - Text on a user-picked tile colour is black or white, whichever contrasts more. It is measured, never fixed.
- Widgets cannot read tokens. A widget copies the values it needs from the palette.
Use the files as they are. Do not recolour, stretch or redraw them.
The interface draws one icon set, defined in ui/js/icon-set.js. This list is built from that file, so it always matches the app.
Each icon is a short list of shapes on a 24-unit grid. The file turns the list into an SVG sprite. Icons follow the text colour, and one part per icon takes the accent.
| Rule | Value |
|---|---|
| Grid | 24 by 24. Draw inside 2 to 22. |
| Coordinates | Whole numbers on every straight edge. |
| Stroke and gap | 2 and 2. |
| Corners | 4 for shapes 14 or larger, 3 medium, 2 small. |
| Bars and dots | Bars 2 high, rows every 4. Dots radius 2, nodes radius 3. |
| Accent | At most one part: the thing the icon is about. |
Adding an icon for a widget
Section titled “Adding an icon for a widget”-
Add an entry to
ICONSinui/js/icon-set.js. Draw what the widget shows, in as few shapes as read at 16 pixels.system: {shapes: [line('M3 16 7 12 11 15 16 8'), // the graphdot(19, 6, 3, 'accent'), // the latest reading],}, -
Map a glyph name to it in
ui/js/widget-glyphs.js, and add the same name toVALID_GLYPHSinapi/src/widgets.js. -
Set
"glyph"in the widget’swidget.json. See List icon.
rect, circle and shape draw bodies. detail, dot and bar draw small parts. line and ring draw lines. A test rejects a glyph that points at no icon.