CSS artifact publishing
The CSS artifact set is the checked-in distribution surface for reseter.css. It gives package and CDN consumers both readable and minified forms of the full reset and the smaller reset, while the package entrypoints direct default consumers to the minified full reset. The artifacts are generated from the Sass entrypoints and must stay aligned with them.
Published artifact set
The distribution contains two reset variants. The full variant starts at src/index.scss and combines the complete reset, while the minimal variant starts at src/mini.scss and provides a smaller rule set. Each variant has a readable CSS file for inspection and a minified CSS file for smaller delivery. Both published variants place their reset rules in the reset cascade layer so consuming styles can control the layer order.
| Source entrypoint | Readable artifact | Minified artifact | Consumer role |
|---|---|---|---|
| src/index.scss | dist/index.css | dist/index.min.css | Full reset; default package stylesheet |
| src/mini.scss | dist/mini.css | dist/mini.min.css | Minimal reset option |
The main and style package fields point to dist/index.min.css. This makes the minified full reset the default when a package consumer imports the package or when a tool reads its stylesheet metadata. Consumers that need a readable file or the smaller reset can select the corresponding distribution file directly. References: package.json• L2-6, package.json• L25-29, src/index.scss• L1-6, src/mini.scss• L1-34, dist/index.css• L1-6, dist/index.min.css• L1, dist/mini.css• L1-11, dist/mini.min.css• L1
Artifact generation flow
The build turns each Sass entrypoint into a readable artifact, applies browser compatibility processing, and then creates the minified form. This keeps the readable and minified files as two delivery forms of the same variant rather than separate style sources.
The flow below shows how the source entrypoints become package-facing files.
flowchart LR
Full["src/index.scss"] --> FullCSS["dist/index.css"]
Mini["src/mini.scss"] --> MiniCSS["dist/mini.css"]
FullCSS --> FullMin["dist/index.min.css"]
MiniCSS --> MiniMin["dist/mini.min.css"]
FullMin --> Package["Package default: dist/index.min.css"]
The build also checks compressed size limits for all four files. These limits protect the delivery goal of the package and apply to the generated distribution files, not to the Sass source alone. References: package.json• L39-47, .bundlewatch.config.js• L1-21, dist/index.css• L1-260, dist/index.min.css• L1, dist/mini.css• L1-78, dist/mini.min.css• L1
Package and release surface
The package includes dist, css, and src in its published file set. This preserves the generated artifacts for direct loading while also shipping the source entrypoints that explain the relationship between the variants.
Release automation attaches the files under dist/*.css to the release. The checked-in files therefore serve both package installation and release download paths. A change to a source entrypoint is incomplete until its affected distribution artifacts represent that change. References: package.json• L25-29, .releaserc.js• L12-25
Consumer selection
Consumers normally use the package default or a direct stylesheet URL. The default is the minified full reset, while direct paths let a consumer choose a readable artifact for inspection or the minimal variant when the full reset is not needed.
| Need | Select |
|---|---|
| Normal package or CDN use | dist/index.min.css |
| Readable full reset | dist/index.css |
| Smaller reset scope | dist/mini.min.css |
| Readable smaller reset | dist/mini.css |
The reset should load before application styles. This lets the application stylesheet define its own presentation after the shared browser defaults have been made consistent. References: README.md• L55-60, README.md• L94-111, package.json• L5-6
Change checklist
When these files or sections are changed, remember to consider these:
- Keep each src/*.scss entrypoint aligned with both its readable and minified
distartifacts. - Keep package.json
mainandstylevalues aligned with the intended default artifact. - Keep the package
fileslist and release asset pattern broad enough to publish every supported consumer-facing CSS path. - Keep the four bundle size limits aligned with the artifacts produced by the build.
- When the full artifact changes, check the compatibility aliases documented in CSS alias copy automation.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
A source entrypoint changes but its dist files are not regenerated | Package consumers receive stale reset rules | Run the full build and review all four generated artifacts |
main or style points to a missing or wrong file | Default package imports load the wrong reset or fail to load a stylesheet | Keep the fields mapped to the published dist set |
| An artifact exceeds its compressed size limit | The distribution build fails its size check | Treat the bundlewatch thresholds as part of the artifact contract |
Release assets omit a changed dist file | Release downloads do not match the package output | Preserve the dist/*.css release asset pattern |
Key files
| File | Why to read it |
|---|---|
| package.json | Defines the package default stylesheet, published paths, and build stages. |
| src/index.scss | Identifies the source entrypoint for the full reset. |
| src/mini.scss | Identifies the source entrypoint for the minimal reset. |
| .bundlewatch.config.js | Defines the size contract for each distribution artifact. |
| .releaserc.js | Shows which CSS artifacts reach release downloads. |
| dist/index.css | Shows the readable full artifact consumed from the distribution set. |
| dist/index.min.css | Shows the default minified package artifact. |
| dist/mini.css | Shows the readable minimal artifact. |
| dist/mini.min.css | Shows the minified minimal artifact. |
| docs/distribution-build.md | Provides the parent view of source compilation and distribution. |
| docs/css-alias-copy-automation.md | Explains the compatibility aliases copied from the full artifacts. |