We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
injectStyles
Hi, we This polyfill does not work well with Lit, as Lit overrides the adoptedStyleSheets in the first connectedCallback.
adoptedStyleSheets
connectedCallback
Currently I could overcome this by overriding the Lit's ReactiveElement#createRenderRoot with a custom implementation, so it spreads the current adopted styles, but it's not a patch.
ReactiveElement#createRenderRoot
When injectStyles is exported it can be patched with way less code, keeping the original implementation.
const originalCreateRenderRoot = (ReactiveElement as any).prototype.createRenderRoot; (ReactiveElement as any).prototype.createRenderRoot = function () { const renderRoot = originalCreateRenderRoot.call(this); injectStyles(renderRoot); return renderRoot; };
The text was updated successfully, but these errors were encountered:
dd39efa
@Totati Thanks for reporting! This is released in v0.4.3.
Sorry, something went wrong.
Export injectStyles -- fixes #200
58e6807
Merge branch 'main' into demo-styles
b0b82c0
* main: v0.4.3 do not error if `window` is undefined Export injectStyles -- fixes #200
No branches or pull requests
Hi, we
This polyfill does not work well with Lit, as Lit overrides the
adoptedStyleSheets
in the firstconnectedCallback
.Currently I could overcome this by overriding the Lit's
ReactiveElement#createRenderRoot
with a custom implementation, so it spreads the current adopted styles, but it's not a patch.When
injectStyles
is exported it can be patched with way less code, keeping the original implementation.The text was updated successfully, but these errors were encountered: