I have this :
@Component({
    selector: 'host-element',
    template: `<elementA></elementA>`,
    styles:[''] //styles here
})
export class hostElement {}
How do I target the styles of elementA component from host-element?
Thanks in advance!!
:host elementA {
  // style here
}
                        Angular has a special css operator /deep/, you can read about it here.
To make a style go beyond your component, put in your css (sass, less):
/deep/ .elemet-a-class {
   ... your style;
}
Or if you want to put it locally, just
styles: ['/deep/ .element-a-class { ... }']
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With