Reputation: 335
I had angular material 10.2.5 in my angular 10 project. I includes the theme by adding this line
@import '@angular/material/prebuilt-themes/deeppurple-amber.css';
in my style.css I create a component and i use a material button with primary color ,but my button color is not applied.
<button mat-button color="primary">Toogle</button>
Any idea ?
Upvotes: 0
Views: 347
Reputation: 284
To be able to import the angular-material theme in your styles.css file. First you have to add the angular-material to your angular project by running this command in CLI.
ng add @angular/material
Now you can import the angular-material file in styles.css by
@import '@angular/material/prebuilt-themes/deeppurple-amber.css';
For the reference you can visit https://material.angular.io/guide/getting-started
Upvotes: 0
Reputation: 124
You can't overwrite the angular material theme, unless you go through the material CSS to create a new color palette.
Upvotes: 0