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

feat(COMPONENT): Design Tokens for Accessing Theme Colors for All Color Tones as Variables at Runtime #30010

Open
fireflysemantics opened this issue Nov 13, 2024 · 1 comment
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team

Comments

@fireflysemantics
Copy link

fireflysemantics commented Nov 13, 2024

Feature Description

This issue is related to this issue:
#27369

Angular 19 is adding system design tokens that provide some of the colors in the created theme.

It would be nice if Angular supplemented this with named design tokens for all the color tones in the color palettes.

So for example if we want the system primary color (Which I think is color tone 40 ) we could do this ( This is a design token that comes with Angular 19 Material Design 3):

.my-button {
  color: var(--mat-sys-primary);
}

But if we want a different color tone ( Lets say number 10) this is still something we would have to use scss getters for. So for example if we wanted to do something like this:

.my-button {
  color: var(--mat-sys-primary-10);
}

We would have to generate those design tokens ourselves, and each project might do that a little differently, so it would be nice if Angular had a SASS utility mixin that could do this for us.

Use Case

Accessing color palette tones by number at runtime.

.my-button-tone-weight-10 {
  color: var(--mat-sys-primary-10);
}

.my-button-tone-weight-20 {
  color: var(--mat-sys-primary-20);
}
.my-button-tone-weight-30 {
  color: var(--mat-sys-primary-30);
}

@fireflysemantics fireflysemantics added feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Nov 13, 2024
@JoolsHattey
Copy link

Think this is similar to this one

#30070

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team
Projects
None yet
Development

No branches or pull requests

2 participants