- From: Andrei Herasimchuk via GitHub <sysbot+gh@w3.org>
- Date: Wed, 23 Apr 2025 11:15:07 +0000
- To: public-design-tokens-log@w3.org
As an example, here's how I'd expect to set up tokens. "Padding" is the category, and the tokens themselves are "tight," "compact," etc.
```
padding: {
tight: {
name: "Tight",
type: exact,
value: {
unit: pixel,
value: 8,
},
},
compact: {
name: "Compact",
type: exact,
value: {
unit: rem,
value: 1,
},
},
cozy: {
name: "Cozy",
type: exact,
value: {
unit: pixel,
value: 24,
},
},
comfortable: {
name: "Comfortable",
type: modulated,
value: {
unit: rem
ratio: majorThird,
step: 3.11,
base: 14,
},
},
open: {
name: "Open",
type: exact,
value: {
unit: sp,
value: 24,
},
},
},
```
Obviously I'm more likely to make all of the token types in the padding category the same, but the larger point is that I should be able to do what I want in the token definition itself, and the declaration of a unit type is so the device, browser, or OS can map that properly.
--
GitHub Notification of comment by AndreiSeldon
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/218#issuecomment-2823943926 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 23 April 2025 11:15:08 UTC