### Setup commands for decius.css development
Source: https://github.com/affineui/decius-css/blob/main/CONTRIBUTING.md
Install dependencies and start the development environment. `pip install` is only needed to rebuild the icon font. `npm run dev` serves the docs site at the printed localhost URL.
```bash
npm install
pip install shapely svgelements # only needed to rebuild the icon font
npm run build
npm run dev # docs site at the printed localhost URL
```
--------------------------------
### Install dependencies and run build, lint, test, and dev commands
Source: https://github.com/affineui/decius-css/blob/main/README.md
Requires Node ≥ 18 and Python 3 with shapely and svgelements for outlining stroke icons into the icon font. Run npm install and pip install first, then use npm run build to generate dist/ (fonts, icon font, css, bundle), npm run lint for stylelint, npm test for build and smoke-test, npm run dev for the docs site (needs one build first), and npm run build:site to build framework and docs site to _site/.
```bash
npm install
pip install shapely svgelements
npm run build # → dist/ (fonts, icon font, css, bundle)
npm run lint # stylelint the SCSS
npm test # build css + smoke-test the artifacts
npm run dev # run the docs site locally (needs one `npm run build` first)
npm run build:site # build framework + docs site → _site/
```
--------------------------------
### Install decius-css via npm
Source: https://github.com/affineui/decius-css/blob/main/README.md
Installs the package from the npm registry.
```bash
npm install decius-css
```
--------------------------------
### Set NPM_TOKEN for automated releases
Source: https://github.com/affineui/decius-css/blob/main/CONTRIBUTING.md
One-time setup to store the npm publish token as a GitHub secret. Requires a granular/automation token with publish permission for `decius-css` and bypass 2FA enabled.
```bash
gh secret set NPM_TOKEN # paste the token when prompted
```
--------------------------------
### Cut a release with npm version and git push
Source: https://github.com/affineui/decius-css/blob/main/CONTRIBUTING.md
Bumps the package version and creates a tag, then pushes main and the tag to trigger the release workflow. The workflow fails fast if the tag doesn't match `package.json`'s version.
```bash
npm version patch # bumps package.json + creates the vX.Y.Z tag
git push --follow-tags # pushes main + the tag → triggers the workflow
```
--------------------------------
### Pre-PR validation commands
Source: https://github.com/affineui/decius-css/blob/main/CONTRIBUTING.md
Run linting, tests, and build before opening a pull request. `npm run lint` uses stylelint, `npm test` builds CSS and smoke-tests artifacts, and `npm run build` regenerates `dist/` which must be committed.
```bash
npm run lint # stylelint (correctness-focused, faithful to the design)
npm test # build css + smoke-test artifacts
npm run build # regenerate dist/ and commit it
```
--------------------------------
### CSS custom property overrides
Source: https://github.com/affineui/decius-css/blob/main/README.md
Override theme tokens directly by setting CSS custom properties on the .dcs container. The example sets --dcs-accent to #ff6b9d and --dcs-r-3 to 8px.
```css
.dcs { --dcs-accent: #ff6b9d; --dcs-r-3: 8px; }
```
--------------------------------
### Use an icon with
Source: https://github.com/affineui/decius-css/blob/main/icons/README.md
HTML usage example for displaying an icon from the decius set. The class pattern is `di di-`; stable codepoints are assigned from U+E000 in sorted name order.
```html
```
--------------------------------
### CDN link for decius-css bundle
Source: https://github.com/affineui/decius-css/blob/main/README.md
Loads the full framework (self-hosted fonts, icon font, and CSS) from jsDelivr. Requires no build step.
```html
```
--------------------------------
### Programmatic API for decius.js
Source: https://github.com/affineui/decius-css/blob/main/README.md
Shows how to trigger toasts, open modals, and initialize dynamically-added markup via the `decius` object.
```js
// programmatic API
decius.toast({ title: 'Saved', variant: 'ok' });
decius.modal.open('#confirm');
decius.init(container); // wire up dynamically-added markup
```
--------------------------------
### Import decius-css CSS and Sass
Source: https://github.com/affineui/decius-css/blob/main/README.md
Shows two ways to include decius-css: importing the prebuilt CSS bundle or compiling from the Sass source for theming.
```js
// plain CSS artifacts
import 'decius-css/css/decius.bundle.min.css';
// …or compile from the Sass source and theme it yourself
@use 'decius-css/scss/decius';
```
--------------------------------
### Wrap UI with decius-css
Source: https://github.com/affineui/decius-css/blob/main/README.md
Includes the CSS and optional JavaScript, then wraps a button in a container with the `dcs` class and density attribute.
```html
```
--------------------------------
### Data API for decius.js components
Source: https://github.com/affineui/decius-css/blob/main/README.md
Shows the data API for toggling a modal and creating a slider. Auto-initializes on DOMContentLoaded.
```html
```
--------------------------------
### HTML theming attributes on a container
Source: https://github.com/affineui/decius-css/blob/main/README.md
Apply runtime theming by placing data-dcs-* attributes on any container; the attributes reshape everything inside it. Supported values: density (compact, comfortable, spacious), radius (sharp, default, round), accent (blue, cyan, orange, violet, green), dark (darker, default, lighter), style (flat default, 3d).
```html
```
--------------------------------
### Regenerate derived source from design/_extracted/
Source: https://github.com/affineui/decius-css/blob/main/design/README.md
Unzip the archives into design/_extracted/ first, then run these commands to re-derive SCSS partials and per-icon SVGs. split-source.mjs outputs to scss/core and scss/web; split-sprite.mjs outputs to icons/svg and icons/icons.json. Note that split-source.mjs documents two manual comment repairs that must be re-applied to the skeuomorphic partial after regeneration.
```bash
# unzip the archives into design/_extracted/ first, then:
node scripts/dev/split-source.mjs # → scss/core, scss/web
node scripts/dev/split-sprite.mjs # → icons/svg, icons/icons.json
```
--------------------------------
### Build pipeline for icon font
Source: https://github.com/affineui/decius-css/blob/main/icons/README.md
Shows the transformation from source SVGs to the shipped web font and CSS. The pipeline runs outline_icons.py (Shapely) then build-icon-font.mjs, producing dist/fonts/decius-icons.woff2 and dist/css/decius-icons.css with .di-* classes.
```text
icons/svg/*.svg
└─ scripts/outline_icons.py strokes → filled outlines (Shapely, deterministic)
└─ scripts/build-icon-font.mjs → dist/fonts/decius-icons.woff2
→ dist/css/decius-icons.css (.di-* classes)
```
--------------------------------
### Refresh vendored fonts
Source: https://github.com/affineui/decius-css/blob/main/fonts/README.md
Run this command to refresh the vendored font files after bumping the Fontsource dev-dependencies.
```bash
node scripts/dev/vendor-fonts.mjs
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.