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.
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.
Where descriptions land
Each format has its own place for documentation, so a description takes whichever shape fits:
| Output | On a token | On a group |
|---|---|---|
| JSON (W3C design tokens) | $description | $description on the group |
| Figma | the variable or style's description field | Figma has no description field for groups, so group descriptions aren't exported |
| CSS & SCSS | a comment on the variable | a comment above the group's variables |
The same file, compiled — switch between W3C and CSS to compare
Next: Scoping — add semantic intent to tokens and control how they appear in previews, W3C JSON, and Figma.
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.