skcr-design-tokens 2.0.0 → 2.0.1

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
@@ -62,6 +62,12 @@ Angular applications then use `skcr-autechre`'s `ThemeService` for toggling and
62
62
  cross-tab synchronization. It does not do the initialization: the script above
63
63
  has already done it.
64
64
 
65
+ ## Upgrading to 2.0.1
66
+
67
+ Nothing to do. `--color-destructive-hover` gets its dark value, red-400: left on the light
68
+ red-800, the hover of `.btn-danger` darkened a red-500 button instead of lightening it, as every
69
+ other action color does in dark.
70
+
65
71
  ## Upgrading to 2.0.0
66
72
 
67
73
  The dark theme is recalibrated on the design (2026-09), and a few light values move with it. No
@@ -72,7 +78,7 @@ class disappears; what changes is how screens look, hence the major.
72
78
  name for name, the page would have turned white.
73
79
 
74
80
  - **Light:** `muted-foreground` back to slate-500 (4.35 on `muted` and `background`, under AA —
75
- kept by design decision), `chart-6` from gray to slate. Everything else is unchanged.
81
+ kept by design decision), `chart-6`, `chart-6-accent` and `chart-6-foreground` from gray to slate. Everything else is unchanged.
76
82
  - **Dark:** `muted` zones sink to the page value (slate-950); `control` sits one notch above the
77
83
  card (slate-800); `muted-foreground`, `subtitle` and `border-color` lighten; `disabled` becomes
78
84
  gray-900; `elevated` goes below its track (slate-950); the scrim is slate-500 in both themes;
@@ -80,21 +86,21 @@ name for name, the page would have turned white.
80
86
  - **The percentile surfaces no longer invert.** `--color-chart-*-foreground` stay light in dark.
81
87
  Text the theme colours (`foreground`, `muted-foreground`…) becomes light on light on them: move
82
88
  that text to the new tokens **before** taking 2.0.0.
83
- - **New tokens:** `--color-control` (since 1.6.0: a table set on a card), and
84
- `--color-data-foreground`, `--color-data-primary-foreground`, `--color-data-muted-foreground` —
85
- text set directly on a data color, same value in both themes.
89
+ - **New tokens:** `--color-data-foreground`, `--color-data-primary-foreground`,
90
+ `--color-data-muted-foreground` — text set directly on a data color, same value in both themes.
91
+ (`--color-control` exists since 1.6.0; 2.0.0 only gives it its own dark value.)
86
92
  - **Known contrast shortfalls** are kept by design decision and stated next to each token in
87
93
  `tokens.css` (statuses as text on dark surfaces, `neutral`, `destructive-foreground`, the
88
94
  `data-*` on some chart colors, `input` and `elevated` as boundaries).
89
95
 
90
- `skcr-autechre` 5.2.0 accepts `^1.6.0 || ^2.0.0`: an application can take the library first and
96
+ `skcr-autechre` accepts `^1.6.0 || ^2.0.0` since 5.2.0: an application can take the library first and
91
97
  move to 2.0.0 once its text on data colors is migrated.
92
98
 
93
99
  ## Contents
94
100
 
95
101
  | Entry | Contents |
96
102
  | --- | --- |
97
- | `tokens.css` | `@theme` block: primary, neutral, status and dataviz colors, and font families |
103
+ | `tokens.css` | `@theme` block: primary, surface and state roles, status, tooltip and dataviz (`chart-*`, `data-*`) colors, and font families; plus the `:root[data-theme='dark']` overrides |
98
104
  | `utilities.css` | `text-body-*`, `text-caption`, `info-caption`, `title-one` to `title-five` |
99
105
  | `components.css` | `.btn` family, `.badge` family, `.link`, `.step-number`, hover tooltip, scrollbar utilities, Angular Material date-picker fix |
100
106
  | `display.css` | **Opt-in.** Presentation classes. No platform application imports it. |
@@ -128,15 +134,17 @@ and **lightens** on a dark one. A zone has an absolute value. The real case:
128
134
  `muted` was exactly equal to `popover` in dark, and every `hover:bg-muted` on a
129
135
  menu was strictly invisible — a contrast ratio of 1.00.
130
136
 
131
- The three states read in this order, in both themes:
137
+ The three states, measured on a popover:
132
138
 
133
139
  | On a popover | rest | `hover` | `primary-subtle` |
134
140
  | --- | --- | --- | --- |
135
- | light | 1.00 | 1.10 | 1.17 |
141
+ | light | 1.00 | 1.10 | 1.04 |
136
142
  | dark | 1.00 | 1.41 | 2.05 |
137
143
 
138
- Selection is therefore always more pronounced than hover. If you add a state,
139
- measure it against the surface that carries it, not in the absolute.
144
+ In dark, selection is more pronounced than hover. In light it is told apart by its
145
+ hue (green against grey), not by its weight — see the `primary-subtle` comment in
146
+ `tokens.css`. If you add a state, measure it against the surface that carries it,
147
+ not in the absolute.
140
148
 
141
149
  ## Extension rules
142
150
 
package/components.css CHANGED
@@ -243,9 +243,9 @@
243
243
  arbitration.
244
244
 
245
245
  Inert for an application that displays no Material component: neither orion
246
- nor gaffer imports Material directly. gaffer, on the other hand, displays a
247
- `skcr-datetime-picker` without this recipe — so that picker renders blue
248
- today.
246
+ nor gaffer imports Material directly. gaffer, on the other hand, displayed a
247
+ `skcr-datetime-picker` without this recipe — so that picker rendered blue
248
+ until this redirection shipped in the package.
249
249
  --------------------------------------------------------------------------- */
250
250
  :root {
251
251
  --mat-sys-primary: var(--color-primary);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skcr-design-tokens",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Design system SkillCorner : tokens de couleur, utilitaires typographiques et classes de composants. CSS pur, sans dépendance.",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": [
package/tokens.css CHANGED
@@ -227,6 +227,9 @@
227
227
  text-warning 2.80, text-success 2.96, text-neutral 1.41, text-destructive 3.84; and
228
228
  destructive-foreground on destructive 3.12. */
229
229
  --color-destructive: #ef4444; /* red-500 */
230
+ /* Its hover lightens, as every action color's does in dark. Left on the light value
231
+ (red-800), it darkened the red-500 button instead. destructive-foreground on it: 2.26. */
232
+ --color-destructive-hover: #f87171; /* red-400 */
230
233
 
231
234
  /* The tooltip inverts: dark on light, it would no longer stand out from an
232
235
  already dark interface. */