Skip to content

T1011: Theme adds a new token name ​

Cause ​

A theme can only override tokens that already exist in the base, so every theme exposes the same set of names.

Example ​

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

// dark.tokens.json
{
  "$extends": "base",
  "primry": {
    "$type": "color",
    "$value": {
      "colorSpace": "srgb",
      "components": [
        0,
        0,
        0
      ]
    }
  }
}

What you see ​

text
ERROR  T1011  dark.tokens.json  primry
  Theme "dark" adds a new token "primry". Themes can only override values of tokens that already exist.
  Did you mean "primary"?
  Run `tessera explain T1011` for details.

Fix ​

Add the token to the base first, or fix the typo (the hint suggests the nearest name).

All errors and warnings