host-context()
(uh nk - ee t ah)
@GuacamoleAnkita
Austin, Texas
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM
:host-context(.row) { .mat-card-content { display: none; } }
<section [class]="group.value" class="dashboard-content"> <tour-of-heroes-card *ngFor="let hero of heroes$ | async" [hero]="hero"></tour-of-heroes-card> </section>
:host { @include mat.elevation(2); . background-color: $container-basic--bg-color; } :host-context(.dark-theme) { @include mat.elevation(8); background-color: $dark-container-basic--bg-color; }
Github repo
Slides
By Ankita Sood
Lightening talk about host-context() @ ng-conf 2022