-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(style): Runtime theme generation #29104
Comments
It's not properly documented yet, but there's a |
Thanks, this is exactly what I needed. Can you also provide a link to find what CSS Vars are used ? |
Below are all the possible ones. You don't need to provide all of them, e.g. if you don't set
|
That's awesome, they are the same as material-web style tokens with just different prefix --md-sys <-> --sys. With material-color-utilities npm package, it should be super simple to provide these. |
AFAIK material-color-utilities don't inject surface tokens as of now, here's a snippet if anyone needs it.
Change the prefix as per requirement 🤞🏻 |
There is a new option to configure the prefix of system variables. Read more about this in my article, which includes a live demo: https://konstantin-denerz.com/angular-material-3-theming-design-tokens-and-system-variables/ |
Offtopic - Your site looks really amazing, I have mostly seen bottom navs (on mobile view) with icons but your text based bottom nav is 🔥 |
First attempt after reading @konstantindenerz article https://github.com/tanishqmanuja/demo.ng-material-dynamic-theme Is this inline with the best practices suggested by angular-material ? PS: |
For one of my article, I used |
Is there a way to do this at component level easily. The double inheritance problem, Why this wont work for individual components? - lit playground Also this is a very common use-case, suppose i want to display multiple color schemes option at once to a user. PRACTICAL NEED: |
At component level angular material uses lots of internal variables. But, with Angular Material 18, team have introduced overrides API, you can use it like below, of course, for runtime changes you will still need to figure out all of CSS (--mat-* and --mdc-*) the variables. button {
@include mat.button-overrides((
ripple-color: red
))
} |
figuring out all those without docs doesnt sound too good either. So that's a no for sure :( |
Feature Description
The ability to generate theme based on a seed color at runtime instead of compile time.
Use Case
This is very common in native android apps and would also benefit ionic/capacitor user to make their app feel more native
The text was updated successfully, but these errors were encountered: