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
mat-sidenav-content
margin-left: 365px;
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.
[style.position]="sidenav.opened ? 'initial' : 'absolute'"
mat-sidenav-container