angular - Styling a child component differently in another component -


i trying style alert box (from bootstrap) [which component] different when shows in 1 of components. other places use default styling.

i able achieve want using:

encapsulation: viewencapsulation.none in parent component. want avoid , learn using best practice.

can shed light of how can achieved without modifying encapsulations ?

in posts users mention use :host , ::content css properties far unable make use out of them.

i believe common scenario , there should way it.

you can use /deep/ in parent like

:host /deep/ some-grand-child {   color: blue; } 

to make selectors cross component boundaries without setting viewencapsulation none.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -