@tokenami/ds 0.0.66 → 0.0.68
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 +18 -9
- package/dist/index.cjs +345 -156
- package/dist/index.d.cts +2499 -156
- package/dist/index.d.ts +2499 -156
- package/dist/index.js +346 -157
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -43,30 +43,39 @@ Use the fluid spacing and font size tokens to create responsive designs without
|
|
|
43
43
|
The following example will apply `8px` (`0.5rem`) padding to your element at the smallest breakpoint, and `16px` (`1rem`) padding at the largest breakpoint.
|
|
44
44
|
|
|
45
45
|
```tsx
|
|
46
|
-
css({
|
|
46
|
+
css({
|
|
47
|
+
'--padding': 'var(--fluid-p-clamp_min-max)',
|
|
48
|
+
'--fluid-p-min': 2,
|
|
49
|
+
'--fluid-p-max': 4,
|
|
50
|
+
});
|
|
47
51
|
```
|
|
48
52
|
|
|
49
|
-
You can adjust the breakpoints the fluid spacings apply to by changing the `--padding`
|
|
53
|
+
You can adjust the breakpoints the fluid spacings apply to by changing the `--padding` clamp value:
|
|
50
54
|
|
|
51
|
-
```
|
|
52
|
-
css({
|
|
55
|
+
```diff
|
|
56
|
+
css({
|
|
57
|
+
- '--padding': 'var(--fluid-p-clamp_min-max)',
|
|
58
|
+
+ '--padding': 'var(--fluid-p-clamp_sm-md)',
|
|
59
|
+
'--fluid-p-min': 2,
|
|
60
|
+
'--fluid-p-max': 4,
|
|
61
|
+
});
|
|
53
62
|
```
|
|
54
63
|
|
|
55
64
|
This will clamp the minimum padding at the small breakpoint, and the maximum padding at the medium breakpoint.
|
|
56
65
|
|
|
57
66
|
### Font sizes
|
|
58
67
|
|
|
59
|
-
Fluid font sizes
|
|
68
|
+
Fluid font sizes accept fluid tokens:
|
|
60
69
|
|
|
61
70
|
```tsx
|
|
62
71
|
css({
|
|
63
|
-
'--font-size': 'var(--fluid-text-
|
|
64
|
-
'--fluid-text-size-min':
|
|
65
|
-
'--fluid-text-size-max':
|
|
72
|
+
'--font-size': 'var(--fluid-text-size-clamp_min-max)',
|
|
73
|
+
'--fluid-text-size-min': 'var(--fluid-text-size_xs)',
|
|
74
|
+
'--fluid-text-size-max': 'var(--fluid-text-size_lg)',
|
|
66
75
|
});
|
|
67
76
|
```
|
|
68
77
|
|
|
69
|
-
This will mean a font size that scales between `
|
|
78
|
+
This will mean a font size that scales between `12px` (`0.75rem`) and `18px` (`1.125rem`) from smallest to largest breakpoints.
|
|
70
79
|
|
|
71
80
|
## Radix UI Colours
|
|
72
81
|
|