Documentation
On this page
Package and builds
@cirthcss/cirth publishes compiled CSS, token JSON and package metadata.
It does not publish a JavaScript runtime or a Sass API.
Start with the default entry point:
import "@cirthcss/cirth";
Choose another entry point only when you need a different ownership boundary or a companion file.
Screen builds #
All four screen builds come from the same source and expose the same token system.
| Build | Package import | Minified file | Use it when |
|---|---|---|---|
| Default | @cirthcss/cirth |
dist/cirth.min.css |
Cirth owns the page and optional classes are useful |
| Classless | @cirthcss/cirth/classless |
dist/cirth.classless.min.css |
You want semantic-element styling without Cirth's optional component and layout classes |
| Scoped | @cirthcss/cirth/scoped |
dist/cirth.scoped.min.css |
Only content inside a .cirth wrapper should opt in |
| Classless scoped | @cirthcss/cirth/classless/scoped |
dist/cirth.classless.scoped.min.css |
You need both constraints |
The classless builds retain .no-cirth, because it is the documented
component-exclusion boundary. They do not make every selector class-free in
the literal sense.
The scoped builds require a wrapper:
<section class="cirth">
<h1>Scoped application</h1>
<button type="button">Save</button>
</section>
Theme tokens are established on that wrapper. Put region-specific token
overrides on .cirth or a descendant. Read
Using Cirth with existing CSS before mixing the
scoped build with third-party styles.
Package exports #
These are the public paths declared by the package manifest:
| Export | Resolves to |
|---|---|
@cirthcss/cirth |
dist/cirth.min.css |
@cirthcss/cirth/classless |
dist/cirth.classless.min.css |
@cirthcss/cirth/scoped |
dist/cirth.scoped.min.css |
@cirthcss/cirth/classless/scoped |
dist/cirth.classless.scoped.min.css |
@cirthcss/cirth/presets/plain |
dist/presets/plain.min.css |
@cirthcss/cirth/presets/material |
dist/presets/material.min.css |
@cirthcss/cirth/presets/metro |
dist/presets/metro.min.css |
@cirthcss/cirth/tokens/light |
dist/tokens/light.tokens.json |
@cirthcss/cirth/tokens/dark |
dist/tokens/dark.tokens.json |
@cirthcss/cirth/package.json |
package.json |
Two wildcard exports support deliberate lower-level access:
@cirthcss/cirth/presets/* maps into dist/presets/*, and
@cirthcss/cirth/dist/* maps into dist/*. Prefer the named paths above
when one exists. Named paths express intent and avoid depending on a filename
convention.
Companion files #
Print #
There is no print stylesheet to add: every build carries its print rules
since v0.17.0. The ./print exports and the cirth.print* files were
removed in that version; Upgrading
says what to delete. The Print page documents what the
print rules change.
Presets #
Presets override tokens and must load after a screen build:
@import "@cirthcss/cirth";
@import "@cirthcss/cirth/presets/plain";
The maintained presets are plain, material and metro.
Presets documents their visual choices, limitations and font
requirements. A preset is not a separate component build.
Token JSON #
The light and dark JSON exports expose the root token surface for
design and build tooling. They do not replace the CSS required in a browser,
and they do not include every component-local slot.
Tokens outside CSS explains the document shape and safe uses.
Physical files #
The published dist/ directory contains 16 generated files:
| Directory | Files |
|---|---|
dist/ builds, print rules included |
cirth.css, cirth.classless.css, cirth.scoped.css, cirth.classless.scoped.css, plus each .min.css counterpart |
dist/presets/ |
plain.css, material.css, metro.css, plus each .min.css counterpart |
dist/tokens/ |
light.tokens.json, dark.tokens.json |
The npm tarball also contains package.json, README.md,
LICENSE.md and NOTICE.md. Source SCSS remains in the repository and
is not part of the published package.
Expanded CSS is useful for inspection and debugging. The named package exports intentionally resolve to minified CSS for normal consumption.
Choose a build #
Use this sequence:
- Start with the default build.
- Choose classless if optional Cirth classes are forbidden or unnecessary.
- Choose scoped if Cirth must not own the whole document.
- Combine them only when both requirements are real.
- Add the matching print entry only if the product needs Cirth's print behavior.
- Add one preset after the build if its design direction fits.
Do not load two screen builds together. They contain overlapping rules from the same source and provide no useful composition.
CDN files #
The same physical CSS files can be loaded from a CDN or hosted on your own origin. Use the version-pinned links and integrity values on Delivery and deployment, not a guessed path.
Verification #
The repository checks that every export resolves from a packed tarball, that consumer imports work, and that the generated variants keep their selector boundaries. These checks validate the package surface. They do not validate your bundler configuration, so run the production check in the guide for your stack.
Related pages #
- Installation for the shortest working setup.
- Compatibility for browsers and CSS transforms.
- Customization for overriding the visual system.
- Delivery and deployment for CDN and self-hosting choices.