Remove previous mat-dialog's CSS from DOM
问题 I use two mat-dialog components in my application, and both have custom styles for cdk-global-overlay-wrapper. The problem here is, even after the first dialog is closed, its CSS still remains in scope, i.e., within the DOM. Hence, the style for cdk-global-overlay-wrapper from the second dialog gets overridden by the first one. Please suggest a possible solution. component1.css ::ng-deep .cdk-global-overlay-wrapper { pointer-events: none !important; } component2.css ::ng-deep .cdk-global