Angular Incorrect Margin-Left Applied To Sidenav Content

后端 未结 5 745
清歌不尽
清歌不尽 2021-01-12 22:30

I have an Angular project using Angular Material but I\'m running into a bug where sometimes the mat-sidenav-content has a margin-left: 365px; appl

5条回答
  •  伪装坚强ぢ
    2021-01-12 23:33

    I have similar problem that was fixed with setting to

    mat-sidenav-content {
        margin-left: 0 !important;
        flex: 1 1 auto;
    }
    

    and

    mat-sidenav {
        flex: 0 1 auto;
    }
    

    together with [style.position]="sidenav.opened ? 'initial' : 'absolute'" and flex to mat-sidenav-container.

提交回复
热议问题