@ckwag/elements-tokens 0.0.1-dev.4ce9c14 → 0.0.1-dev.a75e440

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
@@ -28,6 +28,56 @@ Then use semantic tokens:
28
28
  }
29
29
  ```
30
30
 
31
+ CKW also emits `--ckw-*` aliases for semantic color and typography variables. Prefer the prefixed aliases in new application CSS when you want to avoid collisions with existing app-level tokens; the original unprefixed names remain supported for compatibility.
32
+
33
+ ## Typography
34
+
35
+ The official CSS utility API is the prefixed `ckw-text-*` class set:
36
+
37
+ ```html
38
+ <h1 class="ckw-text-heading-l">Dashboard</h1>
39
+ <p class="ckw-text-body-m">Description text</p>
40
+ <span class="ckw-text-caption">Helper text</span>
41
+ ```
42
+
43
+ For custom CSS, use semantic typography recipe variables:
44
+
45
+ ```css
46
+ .title {
47
+ font-family: var(--text-heading-l-font-family);
48
+ font-size: var(--text-heading-l-font-size);
49
+ font-weight: var(--text-heading-l-font-weight);
50
+ line-height: var(--text-heading-l-line-height);
51
+ }
52
+ ```
53
+
54
+ Legacy `.text-*` utilities and piece tokens such as `--heading-l-size` remain available.
55
+
56
+ ## Font contract
57
+
58
+ Gotham is licensed and is not bundled with this package. Applications must provide their own licensed Gotham files using the family name `Gotham`. The token `--font-family-brand` includes a safe fallback stack:
59
+
60
+ ```css
61
+ --font-family-brand: Gotham, 'Helvetica Neue', Arial, system-ui, sans-serif;
62
+ ```
63
+
64
+ Recommended normal weights are `325` (Book), `500` (Medium), and `700` (Bold) when metric-emphasized typography is used. Use `font-display: swap` for UI text.
65
+
66
+ ## Cascade layers
67
+
68
+ Default imports preserve existing cascade behavior:
69
+
70
+ ```css
71
+ @import '@ckwag/elements-tokens/tokens.css';
72
+ ```
73
+
74
+ For apps that use cascade layers, opt in explicitly:
75
+
76
+ ```css
77
+ @layer ckw-tokens, ckw-elements, app;
78
+ @import '@ckwag/elements-tokens/tokens.layered.css';
79
+ ```
80
+
31
81
  ## JavaScript Usage
32
82
 
33
83
  ```ts
@@ -37,12 +87,13 @@ import rawTokens from '@ckwag/elements-tokens/tokens.json';
37
87
 
38
88
  ## Exports
39
89
 
40
- | Export | Description |
41
- | ------------------------------------ | ---------------------------------------------- |
42
- | `@ckwag/elements-tokens` | JavaScript named exports and default token map |
43
- | `@ckwag/elements-tokens/tokens.css` | CSS custom properties and typography utilities |
44
- | `@ckwag/elements-tokens/tokens.js` | Explicit JavaScript token module |
45
- | `@ckwag/elements-tokens/tokens.json` | DTCG token source |
90
+ | Export | Description |
91
+ | ------------------------------------------- | ---------------------------------------------------- |
92
+ | `@ckwag/elements-tokens` | JavaScript named exports and default token map |
93
+ | `@ckwag/elements-tokens/tokens.css` | CSS custom properties and typography utilities |
94
+ | `@ckwag/elements-tokens/tokens.layered.css` | CSS custom properties wrapped in `@layer ckw-tokens` |
95
+ | `@ckwag/elements-tokens/tokens.js` | Explicit JavaScript token module |
96
+ | `@ckwag/elements-tokens/tokens.json` | DTCG token source |
46
97
 
47
98
  ## Rules
48
99