In this stackblitz demo the background turns red with this selector:
styles: [
`
:host .background-div {
background-color: red;
}
`,
]
However if we remove the .background-div
part of the selector and only use the :host
selector like this:
:host {
background-color: red;
}
The background of the element is not turned red. Just curious why?