You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using css import assertions which are being transpiled at build time and construct-style-sheets-polyfill takes care of adding the styles in unsupported browsers.
However, this seems to be incompatible with this polyfill.
Here's a demo: https://css-paint-polyfill-constructable-style-sheets.glitch.me/
In Chrome and Edge this works, because both constructable style sheets and css paint are supported. In Safari this also works fine somehow. But in Firefox this doesn't seem to work. The styles load fine, except for the css paint animations.
The text was updated successfully, but these errors were encountered:
I think the problem is that in Firefox support for constructable stylesheets has been enabled as of recently. And this polyfill only looks at inline styles or imports.
I believe the only way to support this would be to install a setter on HTMLElement.adoptedStyleSheets that schedules scanning + replacement on those sheets. I don't know if this can be made to work with Shadow DOM though.
Notes for me: I have to check my memory here - I thought Constructible StyleSheets showed up in document.styleSheets when adopted. If so, the issue would be finding a way to install override styles - perhaps they can be appended as rules to the owner stylesheet rather than this polyfill's overrides stylesheet.
I'm using css import assertions which are being transpiled at build time and construct-style-sheets-polyfill takes care of adding the styles in unsupported browsers.
However, this seems to be incompatible with this polyfill.
Here's a demo:
https://css-paint-polyfill-constructable-style-sheets.glitch.me/
In Chrome and Edge this works, because both constructable style sheets and css paint are supported. In Safari this also works fine somehow. But in Firefox this doesn't seem to work. The styles load fine, except for the css paint animations.
The text was updated successfully, but these errors were encountered: