Skip to content

T1002: Invalid token name ​

Cause ​

Token names become CSS custom properties (--t-space-4), so they may only contain letters, numbers, - and _.

Example ​

text
// base.tokens.json
{
  "a b": {
    "$type": "color",
    "$value": {
      "colorSpace": "srgb",
      "components": [
        0,
        0,
        0
      ]
    }
  }
}

What you see ​

text
ERROR  T1002  base.tokens.json  a b
  Invalid token name "a b". Names may only contain letters, numbers, "-" and "_" so they can become CSS custom properties.
  Run `tessera explain T1002` for details.

Fix ​

Rename the group or token without spaces or other punctuation.

All errors and warnings