- CSS 84%
- JavaScript 16%
supram #
A design system for web and app things, built progressively. So far: a leadlight grid, a typography system set in Atkinson Hyperlegible, four palettes on one white foundation (Risograph on white by default), and buttons and icons.
Plain CSS, no build step. Open demo/index.html to see everything.
Use in a project #
Every project keeps its own copy of supram. Nothing loads from a CDN.
With a bundler (Vite, Next, Astro, and so on):
npm install @supramundane/supram
import "@supramundane/supram";
Without a bundler, copy the CSS and fonts somewhere the page can reach and link them:
npx supram copy public/supram
<link rel="stylesheet" href="/supram/css/supram.css">
Keep css/ and fonts/ side by side; the fonts are found relative to the
CSS.
Another palette: supram.css carries Risograph on white. For one of the
others, import @supramundane/supram/neon (or mono, duotone), or link
css/supram-neon.css instead of css/supram.css; the entry files are
identical except for the palette they import. A vendored copy can also swap
the palettes/riso.css import in supram.css.
supram.css imports the layers in order: tokens, base, type, grid,
components, utilities. Anything you write in an unlayered stylesheet wins over all of
them, so overriding is just writing CSS.
Use with an agent #
The skill in skills/supram/SKILL.md is the same material as this README,
written for an agent: setup, the vocabulary, the colour rules, and page
recipes. Three ways to give it to a project:
- As a Claude Code plugin, once for every project:
claude plugin marketplace add https://tangled.org/robin.berjon.com/supramthenclaude plugin install supram@supramundane. - Into one project's skills folder:
npx supram skill. - Any agent that reads
node_modulesfinds it atnode_modules/@supramundane/supram/skills/supram/SKILL.md, andllms.txtat the package root points to it.
npm run check verifies that every token and class the skill mentions
exists in the CSS, that every palette defines the whole role vocabulary,
and that the skill lists every palette's hue classes, so the skill cannot
drift from what ships.
Files #
css/
supram.css entry point, cascade layers
tokens.css custom properties: space, grid, rules, type, motion (no colour)
palettes/ one file per palette (tokens + that palette's hue classes),
all.css for pickers, CONTRAST.txt; generated by scripts/palettes.mjs
supram-<name>.css entry file per non-default palette (generated)
base.css reset and element defaults
type.css @font-face, headings, voices, prose
grid.css page frame, the grid, placement classes
buttons.css the heavy and the quiet button
icons.css Lucide icons as CSS masks (generated by scripts/icons.mjs)
utilities.css colour, geometry, spacing, small layouts
fonts/ Atkinson Hyperlegible Next & Mono, variable, woff2
skills/supram/ the agent skill
bin/supram.mjs `supram copy` and `supram skill`
.claude-plugin/ plugin and marketplace manifests
demo/ the demo page
docs/ the 0.5 brief and the palette study it came from
scripts/ palettes.mjs generates css/palettes/; screenshot.mjs renders the demo in every palette; check-skill.mjs checks the skill against every palette; icons.mjs regenerates icons.css
The npm package ships css, fonts, bin, skills and llms.txt only.
npm run pack:dry lists what would be published.
License #
MIT. The fonts are the Braille Institute's, under the SIL Open Font License
1.1; their license files ship alongside them in fonts/. The icons are
Lucide's, under the ISC license, embedded in css/icons.css.
Grid #
Twelve equal modules across, a fluid gutter between them, and square modules down when you ask for them. Cells fill the whole row until they get a span.
<body class="page">
<header class="full bg-ink">…</header> <!-- bleeds edge to edge -->
<main>
<div class="grid">
<article class="span-md-8">…</article>
<aside class="span-md-4">…</aside>
</div>
</main>
</body>
| Class | Effect |
|---|---|
.page |
Content column with margins and a max width. Children sit in it. |
.full |
A .page child that bleeds to the edges. Its children realign to the content column. |
.grid |
Twelve columns, --gutter gap. Set --columns to change the count. |
.grid--modular |
Rows become square modules. Content that needs more room grows its row. |
.grid--auto |
Auto-fit cards. --min is the smallest cell width. |
.grid--flush |
No gutters. |
.grid--dense |
Backfill holes left by explicit placement. |
.grid--debug |
Paint the columns behind the content. |
.span-n |
Span n columns. .span-full spans the row. |
.start-n |
Start on column line n. With no span, runs to the end. |
.rows-n |
Span n rows. |
.row-n |
Start on row line n. |
.self-start .self-center .self-end |
Cell alignment. |
Every placement class takes a breakpoint infix: .span-md-6, .start-lg-3,
.rows-xl-2. Breakpoints are container widths, so a grid nested in a
narrow cell behaves like a narrow grid.
| Name | Container width |
|---|---|
sm |
30rem |
md |
45rem |
lg |
60rem |
xl |
75rem |
Placement is driven by four custom properties, --span, --start, --rows
and --row, which the classes set. You can set them inline instead:
style="--start: 3; --span: 7". They are registered as non-inheriting, so a
nested grid always starts clean.
Type #
Text is Atkinson Hyperlegible Next, code is Atkinson Hyperlegible Mono. Both
are variable fonts covering weights 200 to 800 with true italics, self-hosted
from fonts/ under the SIL Open Font License.
The scale is fluid between a 320px and a 1440px viewport:
--text-xs sm base md lg xl 2xl 3xl 4xl display.
| Class | Effect |
|---|---|
.display |
The biggest voice: black weight, tight leading. |
.lede |
An intro paragraph a step above body copy. |
.label |
Small caps with wide tracking. |
.caps |
Uppercase with tracking. |
.text-* .weight-* .leading-* .tracking-* |
Raw scale, weight, leading, tracking. |
.measure .measure-narrow .measure-wide |
65, 45, 80 character line lengths. |
.mono |
The mono voice for data in the interface: ids, paths, timestamps. Tabular figures. |
.tabular |
Tabular figures outside a table (tables have them by default). |
.flow |
Space between siblings with --flow. |
.prose |
Long-form: flow, lists, quotes, code, tables, capped measure. |
Tokens #
All in css/tokens.css. Colour follows the OS, or set data-theme="dark"
or "light" on <html> to pin it.
Palettes #
Colour is a palette on one shared foundation: a white page, cool-neutral
greys, near-black ink, and near-black dark mode. Four ship, generated by
scripts/palettes.mjs (npm run palettes) into css/palettes/; every
value is oklch() inside sRGB, with a @media (color-gamut: p3) block that
raises chroma only, and every pair's contrast is in
css/palettes/CONTRAST.txt.
| Palette | Inks | Character |
|---|---|---|
riso (default) |
pink, yellow, teal glass; blue ink | Screenprint on white stock, overprint washes |
neon |
yellow, green, blue, purple, orange, red glass (dasl.ing's hexes); teal ink | Highlighter marks inside black boxes; loud in marks, quiet in body |
mono |
cobalt glass, ink and tint | The quietest; Swiss restraint |
duotone |
cobalt and vermilion, each glass, ink and tint | Cool to navigate, inform and confirm; warm to act, attend and flag |
Every palette defines the same roles, and the base, the components and the role utilities read only those, so a page written against roles renders under any palette:
| Role | Fill class | Text it takes | riso |
|---|---|---|---|
--accent |
.bg-accent |
--on-accent |
pink glass |
--selection |
.bg-selection |
--on-selection |
yellow glass |
--ok |
.bg-ok |
--on-ok |
teal glass |
--warn |
.bg-warn |
--on-warn |
yellow glass |
--link (also --focus, --accent-text) |
.bg-link-ink, .fg-link, .fg-accent |
--on-ink |
blue ink |
--accent-wash, --selection-wash, --ok-wash, --warn-wash |
.bg-wash, .bg-selection-wash, .bg-ok-wash, .bg-warn-wash |
--fg |
20% of the role over the page |
The model is glass, ink and wash: a glass colour is a spot ink printed
solid and always takes the page's ink as text (--on-glass, which is
--fg in the light and --bg in the dark); an ink is text on the page
or a deep fill with page-coloured text (--on-ink); a wash is the only
pale version of an ink, mixed from the glass toward the page; a tint
(mono and duotone) is a pale step that takes ordinary text. The
mid-lightness band, where neither dark nor light text passes 4.5:1, is
deliberately empty in every palette.
Each palette also ships per-hue classes named after its own inks, in its own
file: .bg-pink, .bg-pink-wash, .bg-blue-ink, .fg-blue-ink for riso;
.bg-cobalt, .bg-cobalt-ink, .bg-cobalt-tint for mono; and so on. A
glass fill whose edge matters takes .ruled (a 2px rule) because a light
glass on white can sit at 1.3:1. .overprint multiplies overlapping
decorative fills in the light.
The rules, in short: text is only ink, muted or the link ink; glass fills
take --on-glass and ink fills --on-ink; washes come only from the wash
tokens; at most two spot inks in one section of a screen; meaning never
rides on hue alone. The skill spells them out.
The default palette, for reference:
| Token | Light | Dark | Text it takes |
|---|---|---|---|
--bg |
#ffffff |
#0a0b0d |
--fg |
--surface (chrome, panels, toolbars) |
#eff0f3 |
#121417 |
--fg |
--fg, --rule |
#101214 |
#edeef1 |
|
--muted |
#505357 (7.7:1) |
#a5a8ad (8.3:1) |
|
--hairline |
#cfd1d5 |
#313337 |
|
--pink-glass (accent) |
#ff53a5 (6.3:1) |
#ff65ab (7.2:1) |
--on-glass |
--yellow-glass (selection, warn) |
#fcde3d (14:1) |
#ebd14d (12.9:1) |
--on-glass |
--teal-glass (ok) |
#41d2b3 (9.9:1) |
#4acaad (9.7:1) |
--on-glass |
--blue-ink (link, focus, deep fills) |
#1c50b5 (7.3:1 on bg) |
#94b8f8 (9.8:1 on bg) |
--on-ink; is text on --bg |
Runtime switching is not part of the system: a project picks one palette.
For demos and pickers, css/palettes/all.css scopes every palette under
data-palette="name" on <html>; the demo page uses it.
Semantic #
What the system reads are the semantic names: --bg, --surface,
--fg, --muted, --subtle (code and panel backgrounds),
--hairline, --rule, --accent, --accent-text, --link,
--link-hover, --focus, --selection, --ok, --warn and their
--on-* and --*-wash companions. --black, --white and --paper
from 0.4 remain as aliases of --fg, --bg and --surface, as do
.bg-black and .bg-white.
Content sits on --bg, white in the light and near-black in the dark.
Chrome such as toolbars and panels sits on --surface, a cool grey one
step away from the page. Use .bg-canvas and .bg-surface to place
things on either. Dark mode is never pure black.
Space is an 8px module: --space-1 (0.5rem) through --space-16 (8rem),
plus --space-half (0.25rem). Motion is --duration-fast (120ms),
--duration (180ms), --duration-slow (250ms) and --ease; all three
durations are zero under prefers-reduced-motion.
Screenshots #
npm install
npm run screenshot
Renders demo/index.html at desktop, mobile and desktop-dark into
screenshots/, named after the page (demo-desktop.png and so on), then
desktop and desktop-dark for every other palette (demo-neon-desktop.png
and so on). Pass another page path to render that instead. Uses the Chrome on your machine;
set CHROME_PATH to point elsewhere.
Buttons and icons #
Two weights of button, one height, on <button> or <a>. The heavy one is
for the default or major action on a screen; the quiet one, with an icon, is
for everything else. Icons are Lucide, shipped as CSS masks: no JavaScript,
no sprite, the icon takes the text colour.
<button type="button" class="btn btn-primary">Save</button>
<button type="button" class="btn">Cancel</button>
<button type="button" class="btn btn-quiet"><i class="icon icon-folder-open" aria-hidden="true"></i> Open</button>
<button type="button" class="btn btn-quiet btn-icon" title="Settings"><i class="icon icon-settings" aria-hidden="true"></i></button>
| Class | Use |
|---|---|
.btn |
The heavy button: small caps on a 2px rule, inverts on hover. One or two per screen. |
.btn-primary |
With .btn: filled with ink, for the one action the screen is for. |
.btn-quiet |
With .btn: the same height, a hairline border, plain text. The default for toolbars. |
.btn-bare |
With .btn-quiet: no border until hovered, for icon rows in tight chrome. |
.btn-icon |
A square button holding one icon. Give it a title or aria-label. |
.btn-small |
A shorter button, for rows inside cards and lists. |
.on or aria-pressed="true" |
A quiet button that is a toggle that is on, or the current one of a set. |
.icon with .icon-save, .icon-x, … |
An icon, 1em square, on the baseline. .icon-lg and .icon-sm size one that stands alone. |
The icon names are Lucide's (.icon-save, .icon-search, .icon-x,
.icon-check, .icon-sparkles, .icon-git-commit-horizontal, …);
css/icons.css lists the set that ships. Put the meaning in the label or
the title and mark the icon aria-hidden="true". Do not restyle button
globally; a bare <button> stays native for forms the system does not own.