Skip to content

Commit

Permalink
Merge branch 'main' into color-first-draft
Browse files Browse the repository at this point in the history
  • Loading branch information
resource11 committed Aug 13, 2024
2 parents 5b65608 + e751860 commit 5e76ca5
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 8 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ As vendors adopt the specification and new requirements appear, the community gr
- [Lona](https://github.com/airbnb/Lona)
- [Marvel](https://marvelapp.com)
- [Microsoft](https://www.microsoft.com/)
- [Modulz](https://www.modulz.app)
- [Open edX](https://openedx.org/)
- [Penpot](https://penpot.app/)
- [Philips Design](https://www.philips.com/a-w/about/philips-design.html)
- [Salesforce](https://www.salesforce.com)
- [Sass](https://www.sass-lang.com)
Expand All @@ -80,6 +81,7 @@ As vendors adopt the specification and new requirements appear, the community gr
- [Supernova](https://supernova.io)
- [system-ui](https://github.com/system-ui)
- [Toolabs](https://www.toolabs.com)
- [Tokens Studio](https://www.tokens.studio)
- [Universal Design Tokens](https://github.com/universal-design-tokens/udt)
- [Zendesk](https://www.zendesk.com)
- [Zeplin](https://zeplin.io)
Expand Down
2 changes: 1 addition & 1 deletion technical-reports/format/composite-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ Represents a typographic style. The `$type` property MUST be set to the string `
"$value": {
"fontFamily": "Roboto",
"fontSize": "42px",
"fontWeight": "700",
"fontWeight": 700,
"letterSpacing": "0.1px",
"lineHeight": 1.2
}
Expand Down
46 changes: 40 additions & 6 deletions technical-reports/format/groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,6 @@ Suggested ways tools MAY use this property are:
- A GUI tool that lets users browse or select tokens could display this info alongside the corresponding group or as a tooltip
- Translation tools could output this as a source code comment

<div class="issue" data-number="72">

Groups may support additional properties like type and description. Should other properties be supported at the group level?

</div>

### Type

Groups MAY include an optional `$type` property so a type property does not need to be manually added to every token. [See supported "Types"](#types) for more information.
Expand Down Expand Up @@ -172,6 +166,46 @@ For example:

</aside>

### Extensions

Groups MAY include an optional `$extensions` property where tools MAY add proprietary, user-, team- or vendor-specific data to a group. When doing so, each tool MUST use a vendor-specific key whose value MAY be any valid JSON data.

Group extensions follow the same rules as [design token extensions](#extensions), the only difference is that they relate to the group itself.

- The keys SHOULD be chosen such that they avoid the likelihood of a naming clash with another vendor's data. The [reverse domain name notation](https://en.wikipedia.org/wiki/Reverse_domain_name_notation) is recommended for this purpose.
- Tools that process design token files MUST preserve any extension data they do not themselves understand. For example, if a group contains extension data from tool A and the file containing that data is opened by tool B, then tool B MUST include the original tool A extension data whenever it saves a new design token file containing that group.

Note that, since a group's `$extensions` only relate to that group, they do not have any effect on nested groups or tokens.

<aside class="example">

```json
{
"brand": {
"$extensions": {
"org.example.tool-a": 42,
"org.example.tool-b": {
"turn-up-to-11": true
}
},
"color": {
"acid green": {
"$value": "#00ff66",
"$type": "color"
},
"hot pink": {
"$value": "#dd22cc",
"$type": "color"
}
}
}
}
```

In this example, the "brand" group has 2 extensions: `org.example.tool-a` and `org.example.tool-b`.

</aside>

## Use-cases

### File authoring & organization
Expand Down

0 comments on commit 5e76ca5

Please sign in to comment.