Open
Description
I'd like to request support for :host-context
It doesn't seem to be supported currently.
With it, it would be possible to easily theme your app without breaking component encapsulation.
Currently, all theming has to be in global (s)css classes which is a mess to maintain.
Small example:
my-component.html
<Label text="Hello World"></Label>
my.component.scss
:host-context(.theme-light) Label {
background-color: white;
color: black;
}
:host-context(.theme-dark) Label {
background-color: black;
color: white;
}
app.component.html
<StackLayout [ngClass]="{'theme-light': light, 'theme-dark': !light}"><router-outlet></router-outlet></StackLayout>