Skip to content

Commit

Permalink
Get rid of docs TODO (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
drwpow authored Dec 4, 2024
1 parent 4065bb7 commit f88e809
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions www/src/pages/docs/guides/dtcg.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,22 @@ layout: ../../../layouts/docs.astro

The <abbr title="Design Tokens Community Group">DTCG</abbr> format is a [W3C Community Group specification](https://www.designtokens.org/) started in 2020 and aims to outline a standard, universal design token format that works for all forms of digital design (including web, print, native apps, and beyond).

If you’re familiar with the “what,” “why,” and “how” of the DTCG spec you don’t need to read this guide. This will cover some brief history over how the spec came to be, and what problems it solves for those working with design tokens.
DTCG tokens are stored in JSON, and look something like the following:

## Write once, use everywhere
```json
{
"rebeccapurple": {
"$type": "color",
"$value": {
"colorSpace": "srgb",
"channels": [0.4, 0.2, 0.6]
}
}
}
```

The design philosophy of the DTCG format is **declare tokens once and use them everywhere.** This aligns with the goal of using design tokens in the first place: encoding design decisions in a portable format to be used across multiple software targets.
By storing tokens in a universal format like JSON, you can centrally manage them and generate code for any output target including web and native apps.

But since different platforms have different requirements about how colors are used (e.g. Swift has system colors available, while CSS does not), managing these tokens across platforms becomes impossible to keep up with at scale.
## Format

[TODO]
You can [find the official format here](https://tr.designtokens.org/format/). But for convenience, we also have [a list of token types](/docs/reference/tokens) Terrazzo supports.

0 comments on commit f88e809

Please sign in to comment.