Skip to content

Commit

Permalink
Merge pull request #979 from ic-768/main
Browse files Browse the repository at this point in the history
Fix grammar
  • Loading branch information
jorenbroekema committed Oct 30, 2023
2 parents 2257493 + a806648 commit 76c9207
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/transforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions scripts/handlebars/templates/transforms.hbs
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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.

Expand Down

0 comments on commit 76c9207

Please sign in to comment.