@cirthcss/cirth 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,20 +1,21 @@
1
1
  <p align="center">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset=".github/logo-dark.svg">
4
- <source media="(prefers-color-scheme: light)" srcset=".github/logo-light.svg">
5
- <img alt="Cirth" src=".github/logo-light.svg" width="112" height="112">
3
+ <source media="(prefers-color-scheme: dark)" srcset="docs/public/logo_brand_app_dark.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="docs/public/logo_brand_app.svg">
5
+ <img alt="Cirth" src="docs/public/logo_brand_app.svg" width="120" height="120">
6
6
  </picture>
7
7
  </p>
8
8
 
9
9
  <h1 align="center">Cirth</h1>
10
10
 
11
11
  <p align="center">
12
- <strong>Semantic by default. Classes only when needed.</strong>
12
+ <strong>Write HTML. It's already styled.</strong>
13
13
  </p>
14
14
 
15
15
  <p align="center">
16
- Semantic-first CSS for production-ready interfaces with clean HTML,
17
- modern CSS, and minimal class noise.
16
+ Semantic-first CSS where standard elements carry the styling: nav,
17
+ article, button, table. Classes exist only for the few things HTML can't
18
+ say.
18
19
  </p>
19
20
 
20
21
  <p align="center">
@@ -22,15 +23,17 @@
22
23
  ·
23
24
  <a href="#builds">Builds</a>
24
25
  ·
26
+ <a href="#presets">Presets</a>
27
+ ·
25
28
  <a href="#customization">Customization</a>
26
29
  ·
27
30
  <a href="#documentation">Documentation</a>
28
31
  ·
32
+ <a href="#contributing">Contributing</a>
33
+ ·
29
34
  <a href="#browser-support">Browser support</a>
30
35
  ·
31
36
  <a href="#philosophy">Philosophy</a>
32
- ·
33
- <a href="#comparison">Comparison</a>
34
37
  </p>
35
38
 
36
39
  <p align="center">
@@ -49,7 +52,7 @@
49
52
  Include one stylesheet and write ordinary semantic HTML.
50
53
 
51
54
  ```html
52
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@cirthcss/cirth@0.3.0/dist/cirth.min.css">
55
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@cirthcss/cirth@0.4.0/dist/cirth.min.css">
53
56
  ```
54
57
 
55
58
  ```html
@@ -101,10 +104,9 @@ The main generated stylesheets are:
101
104
  | `dist/cirth.scoped.min.css` | Scoped build for embedding Cirth under `.cirth`. |
102
105
  | `dist/cirth.classless.scoped.min.css` | Scoped classless build. |
103
106
 
104
- Theme-specific builds are also generated, for example
105
- `dist/cirth.jade.min.css` and `dist/cirth.classless.slate.min.css`. Cirth
106
- ships three maintained themes azure (default), jade, and slate — each with
107
- light and dark variants. See [Colors](docs/colors.md) for the full list.
107
+ All four builds share Cirth's one official theme (amber), with light and
108
+ dark variants. `cobalt` and `coral` are optional presets, not separate theme
109
+ buildssee [Presets](#presets) below and [Colors](docs/colors.md).
108
110
 
109
111
  ### Classless
110
112
 
@@ -131,6 +133,34 @@ when embedding Cirth into an existing page, CMS, widget, or application shell.
131
133
  </div>
132
134
  ```
133
135
 
136
+ ## Presets
137
+
138
+ `cobalt` and `coral` are optional presets: stylesheets that override an
139
+ existing set of custom properties (color, shadow, type, spacing, motion) on
140
+ top of the default theme. They're worked examples of restyling the system,
141
+ not independently maintained themes — load one after the main stylesheet.
142
+
143
+ - **`cobalt`** — corporate: deep navy primary, cool-toned neutrals, a flat
144
+ shadow, a business-like Arial/Helvetica font stack, denser spacing,
145
+ snappier motion, square corners.
146
+ - **`coral`** — playful: vivid warm primary, warm-toned neutrals, a soft
147
+ coral-tinted glow shadow, a friendly Trebuchet MS font stack, looser
148
+ spacing, bouncy motion, extra-rounded corners.
149
+
150
+ Like the default theme, presets stick to fonts that ship with every major
151
+ OS — no `@import`, no webfont, zero network requests.
152
+
153
+ ```html
154
+ <link rel="stylesheet" href="dist/cirth.min.css">
155
+ <link rel="stylesheet" href="dist/presets/cobalt.min.css">
156
+ ```
157
+
158
+ ```js
159
+ import "@cirthcss/cirth/presets/cobalt";
160
+ ```
161
+
162
+ See [Colors](docs/colors.md) for what each preset changes.
163
+
134
164
  ## Customization
135
165
 
136
166
  Cirth is CSS-first. Override custom properties in your own stylesheet after
@@ -163,10 +193,12 @@ detail.
163
193
 
164
194
  ## Documentation
165
195
 
166
- The full documentation lives in [`docs/`](docs/) as a
167
- [VitePress](https://vitepress.dev) site with live examples. The site itself
168
- is styled with Cirth's own default build — the header, sidebar, prose, and
169
- every demo are ordinary semantic HTML dogfooding the framework.
196
+ The full documentation is published at
197
+ [cirthcss.github.io/cirth](https://cirthcss.github.io/cirth/), built from
198
+ [`docs/`](docs/) as a [VitePress](https://vitepress.dev) site with live
199
+ examples. The site itself is styled with Cirth's own default build — the
200
+ header, sidebar, prose, and every demo are ordinary semantic HTML dogfooding
201
+ the framework.
170
202
 
171
203
  Run it locally:
172
204
 
@@ -218,18 +250,48 @@ npm run docs:dev
218
250
  [Accessibility](docs/utilities/accessibility.md) ·
219
251
  [Reduce motion](docs/utilities/reduce-motion.md)
220
252
  - **Project** —
221
- [Build tooling](docs/build-tooling.md) ·
222
- [Contributing](.github/CONTRIBUTING.md) ·
253
+ [Examples](docs/examples.md) ·
254
+ [Contributions](docs/contributions.md) ·
255
+ [Brand](docs/brand.md) ·
223
256
  [Changelog](CHANGELOG.md)
224
257
 
258
+ ## Contributing
259
+
260
+ Start with [Contributions](docs/contributions.md). It explains the local
261
+ setup, the source layout, the package exports, and the project constraints
262
+ that matter most when changing Cirth.
263
+
264
+ For pull requests, issue triage, and the exact collaboration workflow, read
265
+ [`.github/CONTRIBUTING.md`](.github/CONTRIBUTING.md). If your change touches
266
+ the visual identity, check [Brand](docs/brand.md) first; if it changes the
267
+ public package surface, update [CHANGELOG.md](CHANGELOG.md) in the same
268
+ branch.
269
+
270
+ Useful local checks before opening a PR:
271
+
272
+ ```sh
273
+ npm run build
274
+ npm run docs:build
275
+ npm pack --dry-run
276
+ ```
277
+
225
278
  ## Browser Support
226
279
 
227
280
  Cirth is designed and tested for the latest stable Chrome, Edge, Firefox,
228
281
  and Safari releases. The compiled CSS is processed with Lightning CSS
229
- against the Browserslist [`defaults`](https://browsersl.ist/#q=defaults)
230
- query (roughly: the last two versions of each major browser, everything
231
- above 0.5% global usage, and Firefox ESR). No version of Internet Explorer
232
- is supported.
282
+ against this Browserslist target:
283
+
284
+ ```json
285
+ [
286
+ "Chrome >= 111",
287
+ "Edge >= 111",
288
+ "Firefox >= 113",
289
+ "Safari >= 15.4",
290
+ "iOS >= 15.4"
291
+ ]
292
+ ```
293
+
294
+ No version of Internet Explorer is supported.
233
295
 
234
296
  ## Philosophy
235
297
 
@@ -244,66 +306,6 @@ Core principles:
244
306
  - Avoid utility-first class soup and broad component catalogs.
245
307
  - Keep customization based on CSS custom properties.
246
308
 
247
- ## Comparison
248
-
249
- Cirth, Pico CSS, and Tailwind CSS solve the same broad problem — styling
250
- HTML — with different trade-offs. This is directional, not a benchmark;
251
- actual bundle size depends on the utilities or components you end up using
252
- in every case.
253
-
254
- | | Cirth | Pico CSS | Tailwind CSS |
255
- | --- | --- | --- | --- |
256
- | Styling model | Semantic HTML first; classes only where semantics run out | Semantic HTML first; classes only where semantics run out | Utility-first; classes on nearly every element |
257
- | Typical markup | `<button>`, `<article>`, `<nav>` — no `.btn`, `.card` | Same | `<button class="rounded bg-blue-600 px-4 py-2 ...">` |
258
- | Customization | CSS custom properties, override after loading | CSS custom properties, override after loading | Config file (`tailwind.config.js`) plus utility classes |
259
- | Build step | None to use the default build; only needed to pick a theme | None to use the default build | Required for any production bundle (JIT/content scanning) |
260
- | Themes | 3 maintained (azure, jade, slate), light/dark each | ~20 accent colors, light/dark each | None built in; arbitrary via config |
261
- | Default build, gzip | ~13KB | ~11.5KB | No single default — depends entirely on utilities used |
262
- | Public Sass API | No — CSS only | Yes | N/A |
263
-
264
- **"Classless" Tailwind** setups — writing `@apply` rules against bare
265
- elements (`h1`, `button`, `article`) instead of adding utility classes to
266
- markup — get close to Cirth's authoring experience, but that layer is
267
- something you assemble yourself against Tailwind's utility values. It still
268
- needs the full Tailwind build pipeline (PostCSS, content scanning, JIT) and
269
- isn't a published, versioned stylesheet you can link directly. Cirth and
270
- Pico ship that layer already built, tuned, and versioned.
271
-
272
- Cirth is a fork of Pico CSS; the practical difference today is scope. Pico
273
- maintains a broader theme and utility surface and a public Sass API. Cirth
274
- trims both in exchange for a smaller, more curated build — see
275
- [Differences From Pico CSS](#differences-from-pico-css) below for specifics.
276
-
277
- ## Differences From Pico CSS
278
-
279
- Cirth began as a fork of Pico CSS, but it should be treated as an independent
280
- framework rather than a promise of permanent drop-in compatibility.
281
-
282
- The most important user-facing differences are:
283
-
284
- - Cirth uses the `@cirthcss/cirth` package name and the `--cirth-` CSS custom
285
- property prefix.
286
- - The published package is CSS-only; SCSS is repository source, not a public
287
- Sass API.
288
- - The active build set is focused on default, classless, scoped, and scoped
289
- classless CSS.
290
- - Scoped builds target a `.cirth` wrapper, including custom properties,
291
- document styles, color schemes, and modal states.
292
- - Standalone color utility builds and fluid classless builds are not part of
293
- the public build surface.
294
- - The inherited 20-accent theme set has been reduced to three maintained
295
- themes: azure (default), jade, and slate.
296
-
297
- ## Roadmap
298
-
299
- Cirth is under active development, working toward a stable 1.0. The main
300
- public priorities are:
301
-
302
- - stabilize the CSS custom property surface;
303
- - audit inherited Pico CSS bugs and keep the fixes relevant to Cirth;
304
- - refine layout primitives and decide which utilities should remain;
305
- - document the supported build variants and migration notes from Pico CSS.
306
-
307
309
  ## License
308
310
 
309
311
  Licensed under the [MIT License](LICENSE.md).