Skip to content

Commit

Permalink
docs: fix typos in example readme (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
pocketbird authored and dbanksdesign committed Jul 12, 2019
1 parent 0ad7427 commit 9ad6437
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/advanced/custom-transforms/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Custom tranforms (and transformGroups)
## Custom transforms (and transformGroups)

This example shows how to use custom tranforms (and transformGroups) to apply custom "tranformations" to the properties when converted to design tokens.
This example shows how to use custom transforms (and transformGroups) to apply custom "transformations" to the properties when converted to design tokens.

Transforms are functions that transform a property (in a non-destructive way). The reason for *transforms* is that in this way each platform can consume the property in different ways (eg. changing *pixel* values to *pt* values for iOS, and *dp* or *sp* for Android).

Expand Down Expand Up @@ -81,7 +81,7 @@ Now open the `build.js` script and look at how these custom transforms/transform

A few things to notice in the file:

- the name of a custom "tranform" can be the same as an existing pre-defined method; in that case the pre-defined method is simply overwritten
- the name of a custom "transform" can be the same as an existing pre-defined method; in that case the pre-defined method is simply overwritten
- beyond the existing attributes, you can use custom attributes to create **matcher** functions, used to filter the properties and apply the transform only to those that match the filter condition.
- if you don't specify a **matcher**, the transformation will be applied to all the properties
- the transformation can be applied not only to the **value** of a property, but also to its **name** (and also to its attributes)
Expand Down

0 comments on commit 9ad6437

Please sign in to comment.