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

> 1. It will take time to figure declarations inside like arrays, strings numbers all these types how we show them? CSSOM doesn't have these basic types that all programming languages have.

Can you give concrete examples of something that isn't possible to express in CSS syntax?
Lists of values can easily be expressed in CSS with a comma separated list : `a, b, c, d, ...`

> 2. Actually, you don't need to parse JSON inside SWIFT environment, e.g. packages like Style Dictionary or others will do that using JS. And JS has the native JSON support.

If the argument is that an intermediary tool is doing the heavy lifting then the same would be true when using CSS as a file format. An intermediary tool around JSON could be replaced by an intermediary tool around CSS.

> 3. We are not inventing a new format or rules, but mixing CSS syntax with something else, yes. JSON has its rules, and structured better then CSS — simpler.

I don't follow this statement and don't understand what you mean with this.
Can you elaborate?

> 4. Unfortunately, we can't fully use all props and options we have in CSS because it's not possible to transpile them for other platforms, like animation props. We will need to write them not like in CSS.

I don't expect design tokens to.
I made it clear that the DTCG would need to define the parts of the CSS specification it intends to adopt.

> 5. The goal is not support the web, but create something that could be transpiled to other platforms as well.

The web does not benefit from this approach.
Using the CSS syntax and value definitions does not mean that the file is usable as CSS for a web project.

We would only use the CSS syntax and value definitions to get a head start for a transfer file format.

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


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

Received on Thursday, 17 November 2022 13:37:43 UTC