Reputation: 35
Help Please, Mat Paginator Background is Not Changing, I want it to be transparent and I used the Below Code
::ng-deep .mat-paginator {
background-color: transparent;
}
Upvotes: 2
Views: 5404
Reputation: 954
Try RGBA. I'm using this right now and it's working for me (though I am using transparency but with a certain color). So, you could try something like this:
mat-paginator {
background-color: rgba(255, 255, 255, .1);
}
And if it works, then this could work as well:
mat-paginator {
background-color: rgba(255, 255, 255, .0);
}
My point is, if 100% transparency doesn't work (second example here), then try partial transparency (.1, .5, etc).
Upvotes: 0
Reputation: 769
You're almost there, in this case, you don't need to use ::ng-deep, which is being deprecated.
The reason why it's not working is that this code is expecting a class called mat-paginator and not a tag. So, remove the '.' (dot) in front of your mat-paginator and it will work.
YOUR CSS:
mat-paginator {
background-color: transparent;
}
Upvotes: 4