Comments & Descriptions

Two markers that look alike and do opposite things. A comment is a note to yourself and never leaves your source. A description documents the token and travels with it into every output — JSON, Figma and CSS.

Comments

Write a comment with //. It's a note for whoever is reading the file — stripped when the file compiles, so nothing you write here reaches your design tools or your CSS. For several lines, use several // lines.

Comments are ignored in output
Comments Use // for comments. For multi-line, use multiple // lines.

Descriptions

Three slashes make it documentation. Put /// at the end of a line to describe that token, or on its own line as the first thing inside a group to describe the whole group. Write several /// lines in a row and they join into one description.

Three slashes documents; two stays in your source
Descriptions /// documents a token or a group, and travels into the output.

Where descriptions land

Each format has its own place for documentation, so a description takes whichever shape fits:

OutputOn a tokenOn a group
JSON (W3C design tokens)$description$description on the group
Figmathe variable or style's description fieldFigma has no description field for groups, so group descriptions aren't exported
CSS & SCSSa comment on the variablea comment above the group's variables
The same file, compiled — switch between W3C and CSS to compare
Descriptions in output The same file compiled — descriptions appear in every format that has a place for them.

Next: Scoping — add semantic intent to tokens and control how they appear in previews, W3C JSON, and Figma.