Skip to main contentSkip to docs navigation

Chassis

Contribute

View on GitHub

Set up the Chassis CSS project locally — pnpm workflow, the Astro-powered docs site, and the test suite.

This page is for contributors working on Chassis CSS itself. If you only want to use Chassis in your own project, Installation and Clone and Customize cover what you need.

The contributing guide in the repository covers the conventions, what a pull request needs, and how releases are made.

Tooling setup

Local development depends on Node.js and pnpm; the documentation site is built with Astro.

  1. Install Node.js 22.12 or later. nodejs.org ships installers; Volta and nvm are good options if you manage multiple Node versions.

  2. Install pnpm. The version is pinned in the packageManager field of package.json; corepack enable installs and uses it. See pnpm.io/installation for other ways.

  3. Fork and clone the repository.

    Shell
    git clone https://github.com/chassis-ui/css.git
    cd css
    pnpm install

    pnpm install installs the dependencies of the framework and the documentation site, including the @chassis-ui/website-tokens and @chassis-ui/website-icons packages from npm.

The repository is a pnpm workspace. The framework, which npm publishes, is in packages/css/: scss/, js/, postcss/ and the committed dist/ are folders of it. The documentation site is in packages/site/.

When the install finishes, the scripts documented below are ready to run from the project root.

pnpm scripts

The full list of scripts lives in the root package.json, which runs the scripts of the package in packages/css/. The ones you'll use most often:

CommandWhat it does
pnpm devCompiles CSS and JS in watch mode and starts the docs site dev server. The fastest feedback loop for working on the framework or the docs.
pnpm distProduces the full dist/ and js/dist/ output — compiled, prefixed, and minified CSS and JS, the Tailwind entry, and the type declarations. Both folders are committed; commit the rebuilt files with the source change.
pnpm testLints CSS, JS, and the docs, builds the distribution, runs the Sass and JS unit tests, builds the docs site, and lints the built docs.
pnpm test:ciRuns every check that CI runs, in one command: the unit tests in Chromium, Firefox, and WebKit, the end-to-end tests, and the site build included. Takes several minutes.
pnpm verifyRebuilds dist/ and js/dist/ and fails when the result differs from what is committed. CI runs it.
pnpm css:compileCompiles SCSS to CSS using Dart Sass with source maps.
pnpm css:testRuns the Sass test suite (scss/tests/).
pnpm js:test:unitRuns the unit tests for the JS plugins with Vitest in browser mode.
pnpm js:typecheckType-checks the TypeScript sources of the JS plugins.
pnpm site:buildBuilds the static docs site for production.

Run pnpm run with no arguments to see every available script.

Sass

Chassis CSS uses Dart Sass. The output is post-processed with Autoprefixer and minified with Lightning CSS.

Sass deprecation warnings appear during compile when a transitional Sass syntax is used. They don't block the build. The project tracks the long-term cleanup work — silencing the warnings in your local config is fine in the meantime.

Autoprefixer

Compiled CSS is post-processed with Autoprefixer using the targets defined in .browserslistrc. The build invokes Autoprefixer automatically; if you compile Chassis from source in your own pipeline, run Autoprefixer on the output to match the support matrix in our distribution build.

RTL

Chassis CSS supports RTL through CSS logical properties used throughout the framework. Setting dir="rtl" on the <html> element is sufficient for most components. A small number of components — carousel controls, breadcrumb dividers, menu placement — use explicit [dir="rtl"] selector overrides where the CSS value itself needs to change, not just its direction. See RTL for details.

Documentation site

The documentation is a static Astro site under packages/site/. To run it locally:

  1. Run through the tooling setup above so dependencies are installed.
  2. From the project root, run pnpm dev.
  3. Open http://localhost:4323/css/ in your browser. Edits to the docs MDX files hot-reload automatically.

The site source is in packages/site/; content lives under packages/site/content/docs/. Astro's documentation covers the rendering side of the stack.

Troubleshooting

If a fresh clone refuses to install or build cleanly:

Shell
rm -rf node_modules
pnpm install

If pnpm verify fails after a change, a file in dist/ or js/dist/ is out of date. Rebuild with pnpm dist and commit the changed files.

For anything that survives those resets, open an issue with the failing command and your environment (Node version, pnpm version, OS).

Further reading