Inject CSS into Shadow root after initialisation
Closed this issue · 4 comments
I am making a feed widget that a client can embed on external websites. I am loading sanitized CSS from an API after initialisation and need to be able to inject the CSS into the shadow root but when i try this.$el.shadowRoot.appendChild i get errors.
How can I inject styles after initialisation? Any help would be much appreciated.
I'll be back from holiday in 15days, but in generally injecting the css into the shadow DOM can be done via the cssFrameworkStyles.
The only limitation is with the css vars, that need to be attached to the host and not to the root, and I will try to push this feature to the next version
Thanks @EranGrin i've found they've added a shadowRoot() function to core but it can only be called inside setup() within defineCustomElement so not sure how helpful that might be
@reformatco can we close this issue ?
The only limitation is with the css vars, that need to be attached to the host and not to the root, and I will try to push this feature to the next version
This feature is available in the latest version
feature is available in the latest version