Re: [community-group] ambiguity around nested vs. flat structure (#253)

I guess your issue is more toward the practices rather the format. The parts you are referring to are non-normative in the sense they present the possibility and leave users choose for themselves.

> Does that mean the two are supposed to represent the same thing?

Those two token trees are different, yet one team may prefer one approach while others prefer the other.
To avoid vocabulary confusion, I personally use "path" for the path of the token within the tree, and "name" for the actual token name — the name is also the last element of the path.

> I feel like it should be possible to consume a .token file and be able to output a list of all the available design tokens using only the format. 

If the choice is to use only flat tokens, it's pretty straightforward. Whenever there're groups, you need some kind of object traversal function to figure out the tokens list. I making a [lib](https://github.com/nclsndr/design-tokens-tools) doing that btw.

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


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

Received on Tuesday, 1 October 2024 09:28:57 UTC