-
Notifications
You must be signed in to change notification settings - Fork 29
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
[question] Token referencing an alias gets raw value? #181
Comments
Thanks for raising! So there is no way for Cobalt to know how to execute So I think of the 2 proposals, #2 is the only one that’s possible—we do need to keep I don’t think it’s intentional that’s omitted; it’s probably just a byproduct of how |
A related issue popped up this week with #192. I’ve realized that plugins need 3 things:
I think there’s a way to provide the third without a breaking change to the API. But things like these will inform the 2.0 API revision that will likely happen later this year. On another note, this issue is related to #179 |
Style Dictionary added this concept in v3. They call it "transitive transforms". Just wanted to note it as potential inspiration. |
@jbarreiros ah that’s very helpful, thank you! I am currently exploring something like that as part of the 2.0 plugin API. That will be a good reference point though |
Setup:
palette.json
-> collection of colors, some containing a custom extension that adjusts the raw valuecolors.json
-> collection of color tokens, each referencing a palette colorFor example's sake, let's say my custom extension sets the opacity of an rgba color value.
When a plugin is run, such as
@cobalt-ui/plugin-js
, the value oftoken
in thetransform
function references the value of the alias before the extensions are run, instead of the computed value. For example:Is this intended? If so, is there a way to either:
__original
to include extensionsThe text was updated successfully, but these errors were encountered: