@med-o/design-tokens 0.4.1 → 0.4.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 +21 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,6 +48,27 @@ Light and Dark follow the operating system. Force a theme with `data-theme="ligh
|
|
|
48
48
|
| `@med-o/design-tokens/js` | Resolved values and TypeScript types |
|
|
49
49
|
| `@med-o/design-tokens/src/*` | Source tokens in the DTCG format |
|
|
50
50
|
|
|
51
|
+
## Spacing rules
|
|
52
|
+
|
|
53
|
+
The space between elements comes from one of six rules, never from a free number. The values follow the layout mode (px):
|
|
54
|
+
|
|
55
|
+
| Rule | Use for | Mobile · Tablet · Desktop |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| `inline` | side by side in one group: buttons, tags, filters | 8 |
|
|
58
|
+
| `content` | inside one block: heading, text, actions | 16 |
|
|
59
|
+
| `fields` | form fields below each other | 16 · 24 · 24 |
|
|
60
|
+
| `items` | cards and tiles in a grid or list (= gutter) | 16 · 24 · 24 |
|
|
61
|
+
| `group` | groups inside a section: sub-sections, fieldsets | 32 · 40 · 48 |
|
|
62
|
+
| `section` | sections of a page | 48 · 64 · 96 |
|
|
63
|
+
|
|
64
|
+
Use them as CSS variables (`--medo-layout-gap-items`), as classes (`medo-gap-items`) or in Tailwind (`gap-items`, `space-y-fields`, `py-section`). With [`@med-o/ui`](https://www.npmjs.com/package/@med-o/ui) the layout components `Stack`, `Grid` and `Container` apply them for you.
|
|
65
|
+
|
|
66
|
+
## Versions
|
|
67
|
+
|
|
68
|
+
While the package is 0.x, a patch only fixes bugs and a minor may contain breaking changes – each marked **Breaking:** in the changelog, with how to update. `@med-o/design-tokens` and `@med-o/ui` are always released together with the same version.
|
|
69
|
+
|
|
70
|
+
[What's new](https://design.med-o.de/?path=/docs/what-s-new--docs) · [Versioning & support](https://design.med-o.de/?path=/docs/guides-versioning-support--docs)
|
|
71
|
+
|
|
51
72
|
## License
|
|
52
73
|
|
|
53
74
|
MIT
|