-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default group values #101
Comments
Oh I see. I’m not opposed to the idea, but I think it could have some interesting side-effects, like it could conflict with nested tokens (#79)—you just wouldn’t see the default values in certain outputs. But overall no strong reason to not think about including this. Yes, I don’t want to stray too far from the spec, but also I can’t think of any other possible future usage of |
Hmm yeah, that's a good point about nested tokens 🤔 I suppose the alternative there is to create a |
I’d be interested to explore if your usecase is actually a composite token in disguise, or if it’s just a naming problem. For example, in some semantic naming systems (like Asana’s) they just commit to using Or, perhaps there is some inherent relationship between your Just thinking out loud, this may be why “default” values for groups are slippery terms—if there’s a clear way to “hold it wrong” for a group, then maybe that needs to be some composite type of token (even if it only exists in your DS—the spec allows for custom types). But if the group is flexible / open-ended, and there just needs to be an “other” value, then that may just be a matter of guidelines imposed that are outlined somewhere else other than the tokens schema (again, using Asana’s system as one example) |
Yeah, we're essentially replicating asana's system here with
and so on. It's all doable with what's currently supported in cobalt now, but it would be nicer if we could erase all the defaults to have something like this (which I think asana also does):
We could of course write a transform or custom plugin for this, or abstract this within the consuming code, but it's always nice to have this close as close to the spec/source as possible 😄 |
There's a lot of (stale) discussion in design-tokens/community-group#97 (in which you contributed early on!), but it seems like the proposal from
c1rrus
is a pretty clear path forward and avoids name conflicts.I know you don't want to stray too far from the spec, especially if things could change, but I wanted to see how open you would be to adding a
$default
key for allowing tokens defined at the group level?This input would translate to js as:
The text was updated successfully, but these errors were encountered: