Re: [community-group] Token ID format is not ideal for consuming in hand written code (#119)

We embraced the fact that token ID's can have any characters and are not compatible with CSS.

Our current implementation looks like this :

https://www.npmjs.com/package/@csstools/postcss-design-tokens

```css
@import url('./imported.css');
@design-tokens url('./tokens/basic.json') format('style-dictionary3');

.foo {
 font-family: design-token('font.family.base');
 font-size: design-token('size.font.small');
 color: design-token('color.font.base');
}
```

Autocomplete helps with all the typing (https://marketplace.visualstudio.com/items?itemName=RomainMenke.csstools-design-tokens)

Being able to use the exact naming from a design tool in CSS works really nice.

-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/119#issuecomment-1136081483 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 24 May 2022 15:33:27 UTC