I checked mat-menu API (https://material.angular.io/components/menu/api#MatMenu) but I couldn't find how to add a class on mat-menu cdk overlay.
I want to add a class on cdk overlay which contains mat-menu template. Can anyone help on the same?
I want to add class on parent cdk overlay because in responsive menu is not opening correctly. Check this below image.
Best Answer
Add
backdropClass
to themat-menu
, and then add style in the global style file. Thatcdk-overlay-pane
is the one you want to style for, I think. For example: