@invisibleloop/pulse 0.2.4 → 0.2.6
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/CLAUDE.md +20 -0
- package/package.json +1 -1
- package/public/.pulse-ui-version +1 -1
- package/src/agent/guide-styles.md +10 -0
package/CLAUDE.md
CHANGED
|
@@ -273,6 +273,26 @@ meta: {
|
|
|
273
273
|
|
|
274
274
|
For multi-brand setups, each brand theme file just overrides `--font` in `:root`.
|
|
275
275
|
|
|
276
|
+
## Overriding Theme Colours
|
|
277
|
+
|
|
278
|
+
`pulse-ui.css` defines light theme variables under `[data-theme="light"]`, which has **higher specificity than `:root`**. Overrides written only to `:root` will be silently beaten by those rules.
|
|
279
|
+
|
|
280
|
+
Always target `[data-theme="light"]` when overriding colours for the light theme:
|
|
281
|
+
|
|
282
|
+
```css
|
|
283
|
+
/* WRONG — loses to [data-theme="light"] rules in pulse-ui.css */
|
|
284
|
+
:root {
|
|
285
|
+
--color-accent: #e25;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* CORRECT */
|
|
289
|
+
[data-theme="light"] {
|
|
290
|
+
--color-accent: #e25;
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
If a colour must apply in both themes, set it in both `:root` and `[data-theme="light"]`.
|
|
295
|
+
|
|
276
296
|
## HTTP Response Behaviour
|
|
277
297
|
|
|
278
298
|
- **Full page request** — SSR HTML with hydration bootstrap
|
package/package.json
CHANGED
package/public/.pulse-ui-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.6
|
|
@@ -44,6 +44,16 @@ code { background: var(--ui-surface-2); color: var(--ui-accent); border: 1px sol
|
|
|
44
44
|
|
|
45
45
|
To apply a **light theme**, set `meta.theme: 'light'` in the spec — this adds `data-theme="light"` to the `<body>` and activates the built-in light token set (accessible contrast for badges, alerts, and all semantic colours). Do NOT manually copy token values into `:root`.
|
|
46
46
|
|
|
47
|
+
**Overriding tokens on a light-theme page:** `pulse-ui.css` defines light theme values under `[data-theme="light"]`, which has higher specificity than `:root`. Overrides written only to `:root` will be silently beaten. Always target `[data-theme="light"]` when overriding tokens for a light-theme page:
|
|
48
|
+
|
|
49
|
+
```css
|
|
50
|
+
/* WRONG — loses to pulse-ui.css */
|
|
51
|
+
:root { --ui-accent: #e25; }
|
|
52
|
+
|
|
53
|
+
/* CORRECT */
|
|
54
|
+
[data-theme="light"] { --ui-accent: #e25; }
|
|
55
|
+
```
|
|
56
|
+
|
|
47
57
|
```js
|
|
48
58
|
meta: {
|
|
49
59
|
theme: 'light',
|