Design tokens are one of the most atomic building blocks of an interface and therefore its crucial that designers, design ops and developers have a common understanding and language when speaking about them.
Each sass
or scss
file in the projects design-tokens
folder gets a
entry in the styleguide navigation.
Have a look at the color design tokens of this demo for example.
Design token files can be documented inline using docBlock comments.
A special render
tag is used to specify how the value of the variable
should be used. The Design Token is then parsed by the Design Token Component
and directed to the selected render type.
/**
* This is generic documentation for the whole file
* @render global-custom-renderer
*/
/**
* Token specific doc
* @render default
*/
$myVar: fuchsia;