-
Notifications
You must be signed in to change notification settings - Fork 13.5k
feat(tokens): create variables fallbacks based on its alias token #30404
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one minor suggestion but not a blocker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have a question (repeatedly asked but the same essential question) about the fallback for the rgb variables.
$ion-border-radius-800: var(--ion-border-radius-800, $ion-scale-800); | ||
$ion-border-radius-1000: var(--ion-border-radius-1000, $ion-scale-1000); | ||
$ion-border-radius-full: var(--ion-border-radius-full, 999px); | ||
$ion-border-radius-025: var(--ion-border-radius-025, $ion-scale-050); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of unrelated to the PR but why is this one not after border-radius-0
? And also why does it jump from 0
-> 25
-> 100
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe its due to the order on the actual JSON, as these were added later by the UX team
I'm preventing the generation of fallbacks for rgb variables. Mainly as it would add a little bit more code to achieve that and also rgb are only generated for internal use, they don't come from actual rgb tokens, so I thought it wouldn't bring as much value, as its lees likely devs will customize these. But we can always return to this in the future, if we see it makes sense to add. |
Issue number: internal
What is the current behavior?
Currently, even if a token used an alias token as its value, when we're generating the variables we wouldn't respect this connection and were simply adding the fixed final value.
What is the new behavior?
Does this introduce a breaking change?
Other information