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

Ensure reference design tokens don't include .value #1968

Closed
Tracked by #246
adamstankiewicz opened this issue Jan 27, 2023 · 2 comments · Fixed by #1989
Closed
Tracked by #246

Ensure reference design tokens don't include .value #1968

adamstankiewicz opened this issue Jan 27, 2023 · 2 comments · Fixed by #1989
Assignees
Labels

Comments

@adamstankiewicz
Copy link
Member

adamstankiewicz commented Jan 27, 2023

Currently, all the reference design tokens include .value in their value strings, e.g.:

"value": "{color.primary.base.value}",
"source": "$primary-100",
"modify": [
{
"type": "mix",
"otherColor": "white",
"amount": "0.94"
}
]
},
"200": {
"value": "{color.primary.base.value}",
"source": "$primary-200",
"modify": [
{
"type": "mix",
"otherColor": "white",
"amount": "0.75"
}
]
},
"300": {
"value": "{color.primary.base.value}",
"source": "$primary-300",
"modify": [
{
"type": "mix",
"otherColor": "white",
"amount": "0.50"
}
]
},

However, the .value is implied in the reference token string value. That is, {color.primary.base} should be equivalent to {color.primary.base.value}.

  • Is there an explicit need in our implementation where .value needs to be included in the reference token value strings?
  • If so (presumably due to custom formatters/transforms), can those be refactored slightly to infer the .value as needed?

Further explanation, pretty much all the docs / examples about style-dictionary tend to not include .value in the reference token value strings.

@PKulkoRaccoonGang
Copy link
Contributor

PRs:
Paragon - #1989
Brand - edx/brand-edx.org#45

@adamstankiewicz adamstankiewicz linked a pull request Feb 1, 2023 that will close this issue
10 tasks
@adamstankiewicz
Copy link
Member Author

Closing this issue as the PR is up for @edx/brand but we don't have an alpha release tag for @edx/brand to merge it yet. Also opened #2026 to track this work.

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

Successfully merging a pull request may close this issue.

2 participants