layout.component.html
<mat-sidenav-container class="app-layout" fullscreen>
  <mat-sidenav mode="side"></mat-sidenav>
  <mat-sidenav-content fxLayout="column">
    <mat-toolbar [class.mat-elevation-z4]="true">
      <app-header></app-header>
    </mat-toolbar>
    <main fxFlex="1 1 100%" fxLayoutAlign="center center">
        <router-outlet></router-outlet>
    </main>
    <app-footer></app-footer>
  </mat-sidenav-content>
</mat-sidenav-container>
想在子组件  pricing.component.scss 中修改上面的 <main> 元素的样式,请问如何修改?
::ng-deep 可以解决
::ng-deep main {
  padding-top: 0!important;
}
            :host main
试过了,不起作用
相关链接 https://stackoverflow.com/q/72262275
– dudu 2年前参考链接:Angular Create Style Tag in View Template?
– dudu 2年前参考链接:How and where to use ::ng-deep?
– dudu 2年前