I'm wondering why I've been stuck with this all afternoon, and I find it embarrassing that something so trivial is so hard to do in angular material.
I'm trying to apply a custom style to a snackbar once a button is clicked, this is my code :
this.errormessagecard.open(error.error.message,'Esci', {panelClass : 'error-snackbar'});
I've literally tried everything:
In my component.css
.error-snackbar{
background-color: red!important;
}
error-snackbar{
background-color: red!important;
}
::ng-deep .error-snackbar{
background-color: red!important;
And the same thing in my styles.css
What I get is always the same result, which is this:
Nothing change, why??