@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 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({ '--padding': 'var(--fluid-p_min-max)', '--fluid-p-min': 2, '--fluid-p-max': 4 });
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` property:
53
+ You can adjust the breakpoints the fluid spacings apply to by changing the `--padding` clamp value:
50
54
 
51
- ```tsx
52
- css({ '--padding': 'var(--fluid-p_sm-md)' /* ... */ });
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 are multiples of the base font size. For instance, a `--text-size-min` of `2` will result in a font size of `32px` (`2rem`).
68
+ Fluid font sizes accept fluid tokens:
60
69
 
61
70
  ```tsx
62
71
  css({
63
- '--font-size': 'var(--fluid-text-size_min-max)',
64
- '--fluid-text-size-min': 2,
65
- '--fluid-text-size-max': 4,
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 `32px` (`2rem`) and `64px` (`4rem`) from smallest to largest breakpoints.
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