#Incorporate global styles in Angular Elements

4 messages · Page 1 of 1 (latest)

worn ridge
#

I have quite a substantial Angular application from which I have to export a component as a web component. I'm looking into Angular Elements but I'm running into problems with styling rules.

We have a lot of app-wide styling in global scss (partials) but these are not used when compiling the web component. The encapsulated styling (e.g. the stylesheets for the web-component and it sub-components) are compiled correctly.

Does anyone have any experience with this? It would be a large endeavor (and quite redundant) to declare the global styling again in my web-component scss.

Is it possible to include global styling? I haven't found any concise documentation or options on stackoverflow so any help/suggestions would be greatly appreciated!

stray lodge
#

if your component has a lot of conditional classes you might miss them though

#

your global styling doesn't apply to the app you plan to use your component in?