Re: [community-group] Use CSS as a transfer format instead of JSON. (#185)

I think you misunderstood what I meant with this proposal :)

I do not mean to encode design tokens as CSS that would work in a browser.
This would never work because there is no document tree to match things against.

I meant to use CSS as a basis for a storage format.

```css
/* file: brand.tokens.css */
@token shadow-token {
  box-shadow: 8 8 24 #00000088;  
}
```

This is syntactically correct CSS and uses existing specifications for parsing, serializing.
It also uses existing specifications for values and properties.

It however does nothing in a browser.
If you want to use this token in CSS you would need to convert it just like you would need to for iOS or any other platform.

-----

In a way this is a counter point to :

- https://github.com/design-tokens/community-group/issues/120
- https://github.com/design-tokens/community-group/issues/121

There seems to be resistance to making the specification lean and easy to consume in software.

This proposal embraces the reasons behind that :
- easy to read/write for humans
- very forgiving so that anyone can experiment with custom things not (yet) in the specification
- reducing the surface the specification needs to define

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


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

Received on Wednesday, 23 November 2022 08:16:14 UTC