How can I use angular material components with shadow dom encapsulation

Viewed 581

I have a new angular project and I've added angular material to it. The components work great with the default view encapsulation method. But they all look horrible with encapsulation: ViewEncapsulation.ShadowDom. Is there a way to make them work with shadow dom? In the end I would like to integrate my component(s) into another app using angular elements and if it's possible I don't want any conflicts between my styles and the styles of the host application.

1 Answers

Gidon Handler says that ShadowDom does not play well with Material: https://gidon-handler.medium.com/

(I understand that ShadowDom prevents the component from seeing global css and Material makes use of global css. You might workaround but it won't be pretty).

Related