Skip to content

Alias not resolved #2

Open
Open
@omh

Description

Hello 👋 Thanks for putting together this validator and thanks for making it available to the public. It's great to have a validator so we can better align the implementations of design tokens.

I'm wondering if there's a bug resolving aliases? I expect this example to be valid:

{
  "Action": {
    "$type": "shadow",
    "$value": {
      "blur": "2px",
      "color": "{one}",
      "offsetX": "0px",
      "offsetY": "1px",
      "spread": "0px"
    }
  },
  "one": {
    "$type": "color",
    "$value": "#FFFFFF"
  }
}

However I get the following error:

Value "{one}" for token "Action" is not a valid color value

A color token resolving another color token's value works however:

{
  "my color": {
    "$type": "color",
    "$value": "{one}"
  },
  "one": {
    "$type": "color",
    "$value": "#FFFFFF"
  }
}

Thanks again!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions