Welcome to Styles, the pattern library for iambacon websites.
To get Styles running locally, follow these steps.
You'll need Git and Node.js installed to get this project running.
This project is tested with Node.js 24 and npm 11. If you use nvm, run:
nvm usegit clone https://github.com/iambacon/Styles.gitnpm installThis will build, serve and watch for changes. Browse to your local instance at http://localhost:8080.
npm startTo use Styles in your project you will need to generate the CSS file locally.
npm run buildA minified CSS file will be output to dist/css/style.css.
To build the documentation site and run the same verification as CI:
npm run checkStyles uses BackstopJS to compare the rendered documentation pages against approved reference screenshots.
Build the docs and serve the static output before running visual tests:
npm run docs:build
npm run docs:serve:staticRun the canonical Docker-backed suite:
npm run backstop:testIf Docker is not available, run the local Puppeteer fallback:
npm run backstop:test:localWhen a visual change is intentional, inspect the generated report and approve the new screenshots:
npm run backstop:approveWhen rebuilding the full baseline after config, dependency, or browser upgrades:
npm run backstop:referenceAfter dependency or browser upgrades, expect the old screenshots to need a reviewed baseline refresh.
Distributed under the MIT License.
If you would like to read more about why I created a pattern library and the technology choices I made, please read this post I've finally created UI documentation for my blog with 11ty!