Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias not resolved #2

Open
omh opened this issue Apr 23, 2024 · 1 comment
Open

Alias not resolved #2

omh opened this issue Apr 23, 2024 · 1 comment

Comments

@omh
Copy link

omh commented Apr 23, 2024

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!

@Kubessandra
Copy link

Kubessandra commented May 13, 2024

Hello,
It's possible that alias inside composite $value are not resolving well.

We are not doing a lot of improvement on this repo nowadays, but if you want to add a test for this use case and try to fix it with a PR, we are here to review and assist if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants