css - Angular 2 Material: Sidenav how to remove backdrop -
so using angular cli material design. trying rid of backdrop sidenav , thought simple
.mat-sidenav-backdrop.mat-sidenav-shown{ background-color: transparent !important; }
however isn't having affect. have tried display none, visibility hidden, etc. seems style backdrop being put out inline tag , have thought important override it. isn't working... have ideas don't involve me stripping out backdrop tag/ altering styles via javascript during rendering?
::ng-deep
works great in case, maybe depreciated going forward. recommended way use viewencapsulation.
in component, add following encapsulation:
import { viewencapsulation } from '@angular/core'; @component({ .... encapsulation: viewencapsulation.none })
then css work , override styles custom styles.
.mat-sidenav-backdrop.mat-sidenav-shown{ background-color: transparent !important; }
wiki
Comments
Post a Comment