change mat-menu class code example
Example: mat-menu-content class different
<button mat-button [matMenuTriggerFor]="menu">Menu</button>
<mat-menu #menu="matMenu" backdropClass="custom__menu">
<button mat-menu-item>Item 1</button>
<button mat-menu-item>Item 2</button>
</mat-menu>
.custom__menu + * .cdk-overlay-pane > div.mat-menu-panel > div.mat-menu-content {
... // Add whatever styling you want
}