@morze/ui 0.2.1 → 0.2.2
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 +20 -2
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/morze-ui-tokens.css +1 -1
- package/dist/morze-ui.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -200,10 +200,28 @@ sink them into the page.
|
|
|
200
200
|
|
|
201
201
|
## Customisation
|
|
202
202
|
|
|
203
|
+
**One colour re-tints the whole kit.** The neutral surfaces — panels, inputs,
|
|
204
|
+
table headers, the sunken wells — are not flat grey: each is a neutral mixed
|
|
205
|
+
with a few percent of `--mz-tint`, which points at the brand colour. Change
|
|
206
|
+
`--mz-primary-rgb` and the greys follow it, instead of keeping the violet cast
|
|
207
|
+
they were born with:
|
|
208
|
+
|
|
209
|
+
```css
|
|
210
|
+
:root {
|
|
211
|
+
--mz-primary-rgb: 16, 175, 122; /* the panels and wells go green with it */
|
|
212
|
+
--mz-tint: #8b8b96; /* …or point the tint at a grey for none */
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Text is deliberately left out of this: its contrast is calibrated against the
|
|
217
|
+
background, and dragging a saturated brand through it costs more than it buys.
|
|
218
|
+
The tinted surfaces need `color-mix()` — Chrome 111+, Firefox 113+, Safari 16.2+,
|
|
219
|
+
the same baseline as the rest of the kit.
|
|
220
|
+
|
|
203
221
|
Everything is driven by custom properties; override them after importing the
|
|
204
222
|
styles. The main groups: surfaces (`--mz-bg`, `--mz-surface`, `--mz-elevated`),
|
|
205
|
-
borders, text, tones, the
|
|
206
|
-
`--mz-well*`), geometry (`--mz-radius*`), type (`--mz-font-*`, `--mz-label-*`),
|
|
223
|
+
borders, text, tones, the tint (`--mz-tint`, `--mz-shade`), the convex recipe
|
|
224
|
+
(`--mz-convex-*`, `--mz-face*`, `--mz-well*`), geometry (`--mz-radius*`), type (`--mz-font-*`, `--mz-label-*`),
|
|
207
225
|
motion and states (`--mz-ease`, `--mz-duration`, `--mz-hover-scale`,
|
|
208
226
|
`--mz-press-scale`, `--mz-hover-mix`, `--mz-press-mix`), focus (`--mz-ring-*`).
|
|
209
227
|
|
package/dist/index.cjs
CHANGED