Re: [community-group] Add a `$private` property for tokens (#110)

I like this idea, but I wonder if `true`/`false` isn't sufficient. I can see two different "private" token possibilities:

* This token is a "base unit" of the design system but we don't need it exported to code (what we've been talking about)
* This token should never be used by designers, but we do want it exported to code

What would the latter look like? The [Salesforce design system](https://www.lightningdesignsystem.com/design-tokens/) specifies a token `brand.background.dark` which is a pretty normal color token, but also `brand.background.dark.transparent` which is always defined to be the same color with an alpha value of 0. No one should ever be changing that token, but engineers would still want that value to be available in code. There might be examples of tokens that are perfectly valid but for whatever reason the design system maintainers don't want them showing up in design tools like Figma.

`"$private": true` isn't clear enough to say which of those two cases we're talking about. I like the words `$hidden` and `$export` to specify tokens to hide from design tools and tokens to be filtered out of exported code respectively, but I don't like how one is a "positive" word and one's a "negative" word; maybe the former could be `$visible` instead. So for the previous cases in this thread, instead of marking `"$private": true` you'd add `"$export": false`, and for something like the Salesforce transparent brand color you'd use `"$visible": false`.

Or maybe that idea of "for engineers only" tokens is too small of an edge case to matter?

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


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

Received on Friday, 4 February 2022 23:35:48 UTC