You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ import { StyleDictionary } from 'style-dictionary-utils'
59
59
60
60
StyleDictionary.registerTransform({
61
61
name:'transform/pxToRem',
62
-
type:`value`,
62
+
$type:`value`,
63
63
transitive:true,
64
64
transform: () =>// ...
65
65
})
@@ -586,7 +586,7 @@ myStyleDictionary.extend({
586
586
587
587
### font/css
588
588
589
-
This `value` transformer replaces the value of a w3c typography token with a `$type`or `type`of `typography` with a `css` font string.
589
+
This `value` transformer replaces the value of a w3c typography token with a `$type` of `typography` with a `css` font string.
590
590
591
591
```js
592
592
myStyleDictionary.extend({
@@ -637,7 +637,7 @@ myStyleDictionary.extend({
637
637
638
638
### fontFamily/css
639
639
640
-
This `value` transformer replaces the value of a w3c fontFamily token with a `$type`or `type`of `fontFamily` with a `css` fontFamily string.
640
+
This `value` transformer replaces the value of a w3c fontFamily token with a `$type` of `fontFamily` with a `css` fontFamily string.
641
641
642
642
```js
643
643
myStyleDictionary.extend({
@@ -682,7 +682,7 @@ myStyleDictionary.extend({
682
682
683
683
### fontWeight/number
684
684
685
-
This `value` transformer replaces the value of a w3c fontWeight token with a `$type`or `type`of `fontWeight` with a `css` fontWeight number.
685
+
This `value` transformer replaces the value of a w3c fontWeight token with a `$type` of `fontWeight` with a `css` fontWeight number.
686
686
687
687
```js
688
688
myStyleDictionary.extend({
@@ -727,7 +727,7 @@ myStyleDictionary.extend({
727
727
728
728
### gradient/css
729
729
730
-
This `value` transformer replaces the value of a w3c gradient token with a `$type`or `type`of `gradient` with a `css` gradient string.
730
+
This `value` transformer replaces the value of a w3c gradient token with a `$type` of `gradient` with a `css` gradient string.
731
731
732
732
```js
733
733
myStyleDictionary.extend({
@@ -782,7 +782,7 @@ myStyleDictionary.extend({
782
782
783
783
### cubicBezier/css
784
784
785
-
This `value` transformer replaces the value of a w3c cubicBezier token with a `$type`or `type`of `cubicBezier` with a `css` cubicBezier string.
785
+
This `value` transformer replaces the value of a w3c cubicBezier token with a `$type` of `cubicBezier` with a `css` cubicBezier string.
786
786
787
787
```js
788
788
myStyleDictionary.extend({
@@ -832,7 +832,7 @@ myStyleDictionary.extend({
832
832
833
833
### clamp/css
834
834
835
-
This `value` transformer replaces the value of a token with a `$type`or `type`of `clamp` that has a `$value` object with `min`, `ideal` and `max` property, with a css `clamp` function.
835
+
This `value` transformer replaces the value of a token with a `$type` of `clamp` that has a `$value` object with `min`, `ideal` and `max` property, with a css `clamp` function.
836
836
837
837
```js
838
838
myStyleDictionary.extend({
@@ -935,7 +935,7 @@ myStyleDictionary.extend({
935
935
936
936
### isColor
937
937
938
-
Only allows tokens with a `type` or `$type` property of `color`.
938
+
Only allows tokens with a `$type` property of `color`.
939
939
940
940
**Filter name:**`"isColor"`
941
941
**Import function:**`isColorFilter` from `'style-dictionary-utils/filter/isColor.js'`
@@ -956,7 +956,7 @@ myStyleDictionary.extend({
956
956
957
957
### isGradient
958
958
959
-
Only allows tokens with a `type` or `$type` property of `gradient`.
959
+
Only allows tokens with a `$type` property of `gradient`.
960
960
961
961
**Filter name:**`"isGradient"`
962
962
**Import function:**`isGradientFilter` from `'style-dictionary-utils/filter/isGradient.js'`
@@ -977,7 +977,7 @@ myStyleDictionary.extend({
977
977
978
978
### isTypography
979
979
980
-
Only allows tokens with a `type` or `$type` property of `typography`.
980
+
Only allows tokens with a `$type` property of `typography`.
981
981
982
982
**Filter name:**`"isTypography"`
983
983
**Import function:**`isTypographyFilter` from `'style-dictionary-utils/filter/isTypography.js'`
@@ -998,7 +998,7 @@ myStyleDictionary.extend({
998
998
999
999
### isTransition
1000
1000
1001
-
Only allows tokens with a `type` or `$type` property of `transition`.
1001
+
Only allows tokens with a `$type` property of `transition`.
1002
1002
1003
1003
**Filter name:**`"isTransition"`
1004
1004
**Import function:**`isTransitionFilter` from `'style-dictionary-utils/filter/isTransition.js'`
@@ -1019,7 +1019,7 @@ myStyleDictionary.extend({
1019
1019
1020
1020
### isStrokeStyle
1021
1021
1022
-
Only allows tokens with a `type` or `$type` property of `strokeStyle`.
1022
+
Only allows tokens with a `$type` property of `strokeStyle`.
1023
1023
1024
1024
**Filter name:**`"isStrokeStyle"`
1025
1025
**Import function:**`isStrokeStyleFilter` from `'style-dictionary-utils/filter/isStrokeStyle.js'`
@@ -1040,7 +1040,7 @@ myStyleDictionary.extend({
1040
1040
1041
1041
### isShadow
1042
1042
1043
-
Only allows tokens with a `type` or `$type` property of `shadow`.
1043
+
Only allows tokens with a `$type` property of `shadow`.
1044
1044
1045
1045
**Filter name:**`"isShadow"`
1046
1046
**Import function:**`isShadowFilter` from `'style-dictionary-utils/filter/isShadow.js'`
@@ -1061,7 +1061,7 @@ myStyleDictionary.extend({
1061
1061
1062
1062
### isFontWeight
1063
1063
1064
-
Only allows tokens with a `type` or `$type` property of `fontWeight`.
1064
+
Only allows tokens with a `$type` property of `fontWeight`.
1065
1065
1066
1066
**Filter name:**`"isFontWeight"`
1067
1067
**Import function:**`isFontWeightFilter` from `'style-dictionary-utils/filter/isFontWeight.js'`
@@ -1082,7 +1082,7 @@ myStyleDictionary.extend({
1082
1082
1083
1083
### isFontFamily
1084
1084
1085
-
Only allows tokens with a `type` or `$type` property of `fontFamily`.
1085
+
Only allows tokens with a `$type` property of `fontFamily`.
1086
1086
1087
1087
**Filter name:**`"isFontFamily"`
1088
1088
**Import function:**`isFontFamilyFilter` from `'style-dictionary-utils/filter/isFontFamily.js'`
@@ -1103,7 +1103,7 @@ myStyleDictionary.extend({
1103
1103
1104
1104
### isDuration
1105
1105
1106
-
Only allows tokens with a `type` or `$type` property of `duration`.
1106
+
Only allows tokens with a `$type` property of `duration`.
1107
1107
1108
1108
**Filter name:**`"isDuration"`
1109
1109
**Import function:**`isDurationFilter` from `'style-dictionary-utils/filter/isDuration.js'`
@@ -1124,7 +1124,7 @@ myStyleDictionary.extend({
1124
1124
1125
1125
### isDimension
1126
1126
1127
-
Only allows tokens with a `type` or `$type` property of `dimension`.
1127
+
Only allows tokens with a `$type` property of `dimension`.
1128
1128
1129
1129
**Filter name:**`"isDimension"`
1130
1130
**Import function:**`isDimensionFilter` from `'style-dictionary-utils/filter/isDimension.js'`
@@ -1145,7 +1145,7 @@ myStyleDictionary.extend({
1145
1145
1146
1146
### isCubicBezier
1147
1147
1148
-
Only allows tokens with a `type` or `$type` property of `cubicBezier`.
1148
+
Only allows tokens with a `$type` property of `cubicBezier`.
1149
1149
1150
1150
**Filter name:**`"isCubicBezier"`
1151
1151
**Import function:**`isCubicBezierFilter` from `'style-dictionary-utils/filter/isCubicBezier.js'`
@@ -1166,7 +1166,7 @@ myStyleDictionary.extend({
1166
1166
1167
1167
### isBorder
1168
1168
1169
-
Only allows tokens with a `type` or `$type` property of `border`.
1169
+
Only allows tokens with a `$type` property of `border`.
1170
1170
1171
1171
**Filter name:**`"isBorder"`
1172
1172
**Import function:**`isBorderFilter` from `'style-dictionary-utils/filter/isBorder.js'`
@@ -1187,7 +1187,7 @@ myStyleDictionary.extend({
1187
1187
1188
1188
### isClamp
1189
1189
1190
-
Only allows tokens with a `type` or `$type` property of `clamp` and an object as the `$value` with a `min`, `ideal` and `max` property.
1190
+
Only allows tokens with a `$type` property of `clamp` and an object as the `$value` with a `min`, `ideal` and `max` property.
1191
1191
1192
1192
**Filter name:**`"isClamp"`
1193
1193
**Import function:**`isClampFilter` from `'style-dictionary-utils/filter/isClamp.js'`
@@ -1208,7 +1208,7 @@ myStyleDictionary.extend({
1208
1208
1209
1209
### isNumber
1210
1210
1211
-
Only allows tokens with a `type` or `$type` property of `number`.
1211
+
Only allows tokens with a `$type` property of `number`.
1212
1212
1213
1213
**Filter name:**`"isNumber"`
1214
1214
**Import function:**`isNumberFilter` from `'style-dictionary-utils/filter/isNumber.js'`
@@ -1352,7 +1352,7 @@ myStyleDictionary.extend({
1352
1352
### getIsType
1353
1353
1354
1354
The `getIsType` function returns a `filter` function that filters by one or multiple types.
1355
-
You can provide one or multiple arguments that are used as `types` to filter against the`type` or`$type` property.
1355
+
You can provide one or multiple arguments that are used as types to filter against the `$type` property.
1356
1356
1357
1357
##### Register as a new filter
1358
1358
@@ -1377,7 +1377,7 @@ myStyleDictionary.extend({
1377
1377
"ts": {
1378
1378
"transforms"://...,
1379
1379
"files": [{
1380
-
"filter":getIsType('size','dimension'), // allows only tokens with type `size` or `dimension`
1380
+
"filter":getIsType('size','dimension'), // allows only tokens with $type `size` or `dimension`
0 commit comments