Apply css in component that uses js library [duplicate]

1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Jason Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Jason
Guest

I think this should work:

    :host >>> .test {
        background-color: green;
    }

The CSS is not applied because your dynamically added HTML doesn’t have the classes applied Angular uses to emulate style encapsulation. Using the “shadow piercing” CSS combinator should work around it.