From d60ea36b9a251cb2e28dbce90b783257cacf7f21 Mon Sep 17 00:00:00 2001 From: Ioannis Chrysostomakis Date: Wed, 24 May 2023 12:02:06 +0300 Subject: [PATCH 1/2] Fix grammar --- docs/transforms.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/transforms.md b/docs/transforms.md index 23824a38e..77853dee6 100644 --- a/docs/transforms.md +++ b/docs/transforms.md @@ -33,7 +33,7 @@ There are 3 types of transforms: attribute, name, and value. **Attribute:** An attribute transform adds to the attributes object on a design token. This is for including any meta-data about a design token such as it's CTI or other information. -**Name:** A name transform transform the name of a design token. You should really only be apply one name transformer because they will override each other if you use more than one. +**Name:** A name transform transforms the name of a design token. You should really only be applying one name transformer because they will override each other if you use more than one. **Value:** The value transform is the most important as this is the one that changes the representation of the value. Colors can be turned into hex values, rgb, hsl, hsv, etc. Value transforms have a matcher function that filter which tokens that transform runs on. This allows us to only run a color transform on only the colors and not every design token. From d559207ceaba7d006f8d79940b9da9a422e9f221 Mon Sep 17 00:00:00 2001 From: Ioannis Chrysostomakis Date: Tue, 19 Sep 2023 00:15:48 +0300 Subject: [PATCH 2/2] Update transforms.hbs --- scripts/handlebars/templates/transforms.hbs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/handlebars/templates/transforms.hbs b/scripts/handlebars/templates/transforms.hbs index 0028534dc..850e731c8 100644 --- a/scripts/handlebars/templates/transforms.hbs +++ b/scripts/handlebars/templates/transforms.hbs @@ -1,8 +1,8 @@ # Transforms -Transforms are functions that modify a [token](tokens.md) so that it can be understood by a specific platform. It can modify the name, value, or attributes of a token - enabling each platform to use the design token in different ways. A simple example is changing pixel values to point values for iOS and dp or sp for Android. +Transforms are functions that modify a [token](tokens.md) so that it can be understood by a specific platform. It can modify the name, value, or attributes of a token - enabling each platform to use the design token in different ways. A simple example is changing pixel values to point values for iOS and dp or sp for Android. -Transforms are isolated per platform; each platform begins with the same design token and makes the modifications it needs without affecting other platforms. The order you use transforms matters because transforms are performed sequentially. Transforms are used in your [configuration](config.md), and can be either [pre-defined transforms](transforms.md?id=pre-defined-transforms) supplied by Style Dictionary or [custom transforms](transforms.md?id=defining-custom-transforms). +Transforms are isolated per platform; each platform begins with the same design token and makes the modifications it needs without affecting other platforms. The order you use transforms matters because transforms are performed sequentially. Transforms are used in your [configuration](config.md), and can be either [pre-defined transforms](transforms.md?id=pre-defined-transforms) supplied by Style Dictionary or [custom transforms](transforms.md?id=defining-custom-transforms). Some platform configuration attributes apply a broader effect over the transforms applied. For example, the `size/remToDp` transform will scale a number by 16, or by the value of `options.basePxFontSize` if it is present. Check individual transform documentation to see where this is applicable. @@ -29,7 +29,7 @@ There are 3 types of transforms: attribute, name, and value. **Attribute:** An attribute transform adds to the attributes object on a design token. This is for including any meta-data about a design token such as it's CTI or other information. -**Name:** A name transform transform the name of a design token. You should really only be apply one name transformer because they will override each other if you use more than one. +**Name:** A name transform transforms the name of a design token. You should really only be applying one name transformer because they will override each other if you use more than one. **Value:** The value transform is the most important as this is the one that changes the representation of the value. Colors can be turned into hex values, rgb, hsl, hsv, etc. Value transforms have a matcher function that filter which tokens that transform runs on. This allows us to only run a color transform on only the colors and not every design token.