I would like to apply a dynamic style to the content of mat-menu. I know that I can use panelClass to assign a class, but my class is dynamic.
Angular has a [ngStyle] or just [style.attribute] binding for such cases, but that does not work on the mat-menu (or other overlays), it only works on directly rendered elements.
I am looking for something like panelStyle which would allow me to set the styles dynamically directly on the panel which holds the mat-menu.
Here is a code example, where panelClass allows me to set some css, but only static one and ngStyle is useless.
<mat-menu [ngStyle]="{'background-color': colorVariable }" panelClass="some-static-class-works">
What I am looking for:
<mat-menu [panelStyle]="{'background-color': colorVariable }">