@cueplusplus/theme-porcelain
v1.0.2
Published
The porcelain theme for @cueplusplus/ui.
Readme
@cueplusplus/theme-porcelain
The porcelain palette for @cueplusplus/ui — measured from coss.com/ui on 2026-09-26: near-white
cards on an off-white ground with hairline borders, a monochrome accent, and a matching near-black
dark mode. Every value was read off the site's served stylesheet and recorded under this system's
token names, not the site's. A palette is a package here precisely so that it is not the only one:
install several, register several, and a theme switcher is an array with more than one entry in it.
Install
The @cueplusplus scope is public on npm and resolves there by default, so there is nothing
to configure and no credential to supply — it installs like any other package.
pnpm add @cueplusplus/theme-porcelain @cueplusplus/theme-base@cueplusplus/theme-base is the one peer this package declares, and it carries the token contract
the palette is written against. A palette on its own paints nothing: install it beside
@cueplusplus/ui and its own peers — §2 has that line.
Quick start
The theme stylesheet is the third import, and its position is load-bearing rather than tidy. A theme
declares its colours under [data-theme="porcelain"], which ties with the blank base's bare :root
at the same specificity, so the one declared later wins. Put it before styles.css and the
blank base paints over it.
/* app/globals.css */
@import "tailwindcss";
@import "@cueplusplus/ui/styles.css";
@import "@cueplusplus/theme-porcelain/theme.css";Then register the manifest. themes is the registry the provider may switch between; theme names
the one that paints.
import porcelain from "@cueplusplus/theme-porcelain";
import { ThemeProvider } from "@cueplusplus/ui/system";
export function Providers({ children }: { children: React.ReactNode }) {
return (
<ThemeProvider themes={[porcelain]} theme="porcelain">
{children}
</ThemeProvider>
);
}Importing the package from its root, rather than reaching for its manifest.json subpath, also
closes ThemeName to the themes you actually installed — so a misspelt theme value is a type
error rather than a page that silently paints the blank base. Add prepaintScript() to <head>
with the same themes array, so the first frame is not the defaults flashing past: §4
has it.
What it ships
| Subpath | What it is |
| --- | --- |
| @cueplusplus/theme-porcelain | the manifest, as both the default export and manifest |
| @cueplusplus/theme-porcelain/theme.css | the palette — the only file a browser needs |
| @cueplusplus/theme-porcelain/variants.css | the density rungs and font pairings this theme adds. Empty: it adds none |
| @cueplusplus/theme-porcelain/manifest.json | the same manifest as JSON, for a tool that reads rather than imports |
| @cueplusplus/theme-porcelain/package.json | |
Both modes, both measured. The manifest is complete with supportsLight: true, so
theme.css writes the whole colour contract four times over: [data-theme="porcelain"] for dark,
[data-theme="porcelain"][data-mode="light"] for light, and both again for [data-mode="system"]
inside a prefers-color-scheme query. Both blocks are the site's own :root/.dark tokens,
resolved through their color-mix() chain and recorded under this contract's names. Three of the
site's own status hues fail 4.5:1 as text on their own page ground, so light ok, warn and
danger move to the site's own -foreground ink for that role instead of its base hue; sunken
moves one step off white in light and one step darker in dark, so each mode's ground can be told
apart from its card (see Departures in MEASUREMENT.md).
Sources are src/porcelain.{dark,light}.tokens.json, colour only — no geometry or type token may
appear in a theme. theme.css, variants.css, manifest.json, index.js and index.d.ts are
written by cue-theme build and committed; prepack runs cue-theme check, which rebuilds all
five in memory and refuses to publish if anything on disk has drifted. Each source's $extensions
says which of the site's roles every value was read from.
No waived contrast pairs. Every required pair clears its floor in both modes, and
theme.config.ts names no knownContrastFailures, so a retune that fails one refuses the build
rather than shipping. MEASUREMENT.md in this package carries the full 26-name table for both
modes, its sources, and every departure from the measurement with its reason.
What it refuses
A palette is colour, so most of what makes the site recognisable is not here, and some of it would not be even if it could be:
- The rest of the look. Type, rhythm and finish are the
data-font,data-styleanddata-paintaxes, set beside the theme rather than inside it. Cal Sans and Paper Mono are a separate font pairing, not part of this package. - The site's own component source.
@coss/uiis AGPL-3.0-or-later; nothing from its class strings, its component recipes or itsbefore:/after:stacks is carried here, only the measured colour facts, which are not ownable. - The site's identity. Its wordmark, its GitHub icon, its skeleton preview illustrations and its copy.
- Its names. The site's own custom-property names (
--sidebar,--card,--primaryand the rest) are not carried. The values are measurements; the names here are this system's.
Where the rest is
- The theming guide — https://ui.cueplusplus.com/docs/theming. The token vocabulary, the
density and mode axes, the other presets, and
createTheme()for a palette of your own. MEASUREMENT.md, in this package — every one of the 26 contract names in both modes, its source in the site's own stylesheet, and the contrast of every gated pair.docs/CONSUMING.md— registry access in full, the peer matrix per subpath, and the table of what a failed install means.CHANGELOG.md, in this package — one entry per release, addressed to you rather than to the diff, with a Migrating section on anything that needs an edit. Read it before an upgrade; the version number alone does not say what moved.
