4 ms·
Maybe I am missing something? The idea seems to be 'using variables'. If so, it does not need a new name like 'design tokens'. Plain CSS itself supports variab
by TacoSteemers 6y ago
Maybe I am missing something?
The idea seems to be 'using variables'. If so, it does not need a new name like 'design tokens'.
Plain CSS itself supports variables and they are easy to use.
The styling in the example is not using CSS, but something that looks like javascript. Does anyone know what it is?
- maecapozzi 6y agoHey, author here. The term "design tokens" has been around for awhile now, not a new term or one I coined. You're pretty much right -- tokens are just variables, they point to primitives. The hard part about getting tokens right is deciding on a specification that teams across your company can agree on. There are many benefits to adopting a shared specification: themeability, easier rebranding. etc. I'm giving an example that uses JavaScript and Styled Components, but this can be accomplished with CSS variables if desired. You can read more about it here if you're interested in a more detailed look: https://maecapozzi.com/design-tokens/ https://maecapozzi.com/design-tokens/