stylescape-mesmera is the reference brand built this way; read it beside
these steps.
- Copy the repository to
stylescape-<brand>(keep the history if you like; the files are what matter). - package.json — set
name(a scope the owner org publishes under, e.g.@<org>/stylescape-<brand>),description,repository,homepage,bugs,author,license; delete"private": truewhen the package is to be published. Set the version inVERSION,CITATION.cffandcodemeta.jsontoo (tst/package.test.mjschecks they agree). - Rename the brand prefix. Replace
--theme-with--<brand>-insrc/scss/tokens/_css-vars.scss,stylelint.config.mjs,tst/package.test.mjs,tst/theme.test.mjsand the docs. - The palette — edit
src/scss/tokens/_brand.scssonly. Name the ramps after the brand ($indigo-*,$ink-*…), mark each swatch taken from the logo// BRAND, and say what every derived step is for. Then point_css-vars.scssandthemes/_dark.scssat the new names; the token names themselves stay core's. - Faces — put the woff2 files under
src/font/<face>/with their licence (OFL.txtor the foundry's terms), declare them insrc/font/fonts.css, put the family first in$font-sans/$font-heading, and list the latin cuts in$preload(base/_fonts.scss). Add aNOTICEfor third-party faces. - Tests — delete
tst/defaults.test.mjs(it holds the template to core's values, which a brand no longer has). The light and dark WCAG AA checks intst/theme.test.mjsstay and must pass with the brand's values; update the pinned values there and intst/core.test.mjs. Add a provenance test (mesmera'stst/brand.test.mjsreads the logo). - Docs — rewrite
README.md,CHANGELOG.mdanddoc/for the brand; delete this page. npm install && npm run check && npm run build.
A site depends on the theme by git tag until the package is published:
"@<org>/stylescape-<brand>": "github:<org>/stylescape-<brand>#semver:^0.1.0"and loads it by its parts, after core if it already loads core:
@use "pkg:@<org>/stylescape-<brand>/tokens";
@use "pkg:@<org>/stylescape-<brand>/themes";import "@<org>/stylescape-<brand>/font/fonts.css";