-
Notifications
You must be signed in to change notification settings - Fork 63
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
Defining "design token" from a "technical" perspective #42
Comments
Your example of styles using previously defined tokens is exactly how I have been creating tokens for my headings too. I have followed this pattern through to other components too, such as buttons and cards that share a global
In terms of the gradient and shadows, I have been keeping each part of the property as a single token, such as your seperated example, but then creating a complete token from those.
|
Hey @samwilliscreative if this is a typical case, maybe it would make sense to define Alternatively this could be defined as Of course, we do have to also differentiate if a "shadow" is one token (is it more like a color, something you use as a whole) or is it more like a text style (a composed value of individual tokens that may be used in different places as well). |
Just to ensure parallel discussions are tied together. The discussion around theming already had some discussion around using Looking at the images in the linked comment, |
Thanks @Kingdutch, as far as I can see the theming topic is mostly about referencing design tokens in other design tokens. E.g. the choice Both choices and options are what I called "single value design tokens" (which of course is not a name I would actually use but just to clarify). But I think this does not really answer the points above. Does this make sense @Kingdutch or did I miss something?
I think using the naming I use above |
It makes sense to have multi valued tokens, I'm using one to combine a Edit: As is referred to as groups here |
@lukasoppermann thanks for kicking off this thread. The Format group has already had several conversations about the types of tokens you mention. One thing we've come around to is that CSS shorthand properties are a feature of a particular context: CSS. As we think about tokens more broadly, and supporting additional contexts (iOS, Android, Design tooling), we're discussing whether or not the source syntax of tokens should have any knowledge of a context like CSS, or if that should be something that's applied during a transformation process to CSS. We're still discussing this, so it's great to see what the community is thinking about. |
Hey @kevinmpowell, thanks for reaching out. I feel the RFC format topic has grown quite broad so that a lot if things get lost within the many, many lines of text. 😁 As this is a very important questions I think it deserves a separate place, especially since I think it may only be related but not completely included in the format standard. (Technically, so far at least, a token could be of any type and kind.) Concerning shorthands & knowledge of contextI agree with that tokens (being in their nature technology agnostic) should have NO knowledge of the context. I am more concerned with the mental model around tokens. As a designer a I think this mental model is what we can and should still standardise and form. Do I make sense? 🙃 |
I think what you're saying is one person's definition of the term "token" may be very different from another person's definition of the term "token." That is something we've found very true thus far in our discussions. We're working toward defining that and getting on the same page as a group of editors. What you've raised here about the distinction between multi-value and single-value tokens is an important aspect of that. I agree the RFC Issue has gotten very broad. I'll bring this up at the next editors meeting. I think separate discussion threads for the community around some facets of the format may make sense at this point. |
Exactly! 👍
That would be great. Thank you. 🙏 If I can help with that in any way please let me know. |
@lukasoppermann sorry for coming late to the party, only found out about this community a couple of days ago. But, here I am. Yes, a token can be single or multi value, but that depends on the detail levelling or context. Shorthand vs longhand will also come to play here. The technical aspect of a specc (css) can be changed / broken, and browsers can interpret shorthands differently. Take gradients for example, in some occasions you just want the start / stop pattern predefined, or only the color, or only a group in the gradient, or event whole stacked gradients. How can a design token spec take this into consideration? I think the spec needs to allow for both levels of control. Another example could be For me, it feels like it's getting out of hand. In my use case, in regards of shadows, we've predefined shadows as a whole, combining every attribute into one token. Makes it easier, not many "loose parts". KISS and all that. |
Closing this thread because we have implemented a glossary since, which can be added to over time. https://www.designtokens.org/glossary/ |
Hey,
I think it would be very important for the standardisation process to define what we within the community group would define as a design token. This has influence on the specs for the format #1 and possibly other specs as well.
It will potentially also influence how tools would export and implement design tokens. I for example, am thinking about this because I am work working on a figma plugin for design tokens.
It may seem clear at first, but I tripped about the following aspects and there are probably more.
Single value entities
We can probably agree that any single value design property can be a design token.
Examples: (using css as an easy to show example)
Multi-Value entities
There are properties like shadows or gradients that have more than one value.
The question is if the combined property is a design token or if only the indivisible aspects are design tokens:
Examples combined:
Examples separated:
When working as a designer one would normally see the entire gradient or the shadow / elevation as a key aspect. E.g. for this card I used
elevation-small
. I don't know if this may be different for developers.Multi-property entities (e.g. styles)
When working for example with text-styles there are different properties like
font-size
andfont-family
that make up a style. I would assume only the individual properties to be design tokens and the combination to bestyles
. Is this something we can agree on?Examples design tokens
Examples style (?)
The text was updated successfully, but these errors were encountered: