I am currently working with a dialog
component provided by angular-material
and I need to customize the appearance of the popup dialog.
I am aware that there is some support for styling through the component generation:
let dialogRef = dialog.open(MyDialogComponent, {
height: '400px',
width: '600px',
panelClass: 'some-class'
});
However, this leads to the style definition being split between the dialog component style and the generation definition. What I want to achieve is to adjust the style of the dialog itself for all dialogs of this type. One approach would be to utilize :host
in the component's CSS:
:host {
width: 600px;
padding: 0px;
}
Here is a Plunker demonstrating my idea.
Is it feasible to accomplish this?