-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
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
Question: Web Component support #1
Comments
Hmmm. could be that you are importing the polyfill in the global scope, but the styles declared in the web-component are rendered in the component's shadow dom, and the script can't polyfill what it can't see. The fix I am guessing is to import the script inside the web-component so the polyfill can see the css in the component's shadow dom. I am new to web-components and container queries, but stuff like this has bitten me in the past, so I'd guess this is the culprit. |
hm, I'm not sure what you mean. I'm explicitly passing the shadow root to the polyfill. |
I had the same problem with it not working in a Web Component. I believe the problem is the way it builds the selector in getElementSelectorText. I couldn't find an equivalent to :root that would match the web component's root node, so for now I've replace getElementSelectorText with this, and it seems to work so far:
|
Hey, I tried to get this to work with lit, but failed: https://codepen.io/lazka/pen/ExWgrYb
I was wondering if I'm missing something or if this isn't supported?
The text was updated successfully, but these errors were encountered: