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
Hello 👋 I'm trying to play around with the polyfill and am struggling to get the example paint module to work as expected. Hoping to get some clarity on where I'm going awry setting things up.
The site I'm working on is built with Remix, which is server-side rendered, so I can't get access to the window until after the initial mount. The way I've gotten around this is by using isomorphicLayoutEffect and node require to load in the polyfill prior to calling CSS.paintWorklet.addModule.
This seems to work fine; the network request fetching the module code succeeds:
The custom elements are being injected after the document body:
And inline styles are being walked after paint registration:
However, the custom paint does not seem to apply to the div; it just renders as a rectangle with a blue border, as though I had never applied the custom paint style:
I'm assuming there's something funky going on when it comes to writing the paint css rules to a stylesheet, but not entirely sure.
Hello 👋 I'm trying to play around with the polyfill and am struggling to get the example paint module to work as expected. Hoping to get some clarity on where I'm going awry setting things up.
The site I'm working on is built with Remix, which is server-side rendered, so I can't get access to the window until after the initial mount. The way I've gotten around this is by using
isomorphicLayoutEffect
and node require to load in the polyfill prior to callingCSS.paintWorklet.addModule
.This seems to work fine; the network request fetching the module code succeeds:
The custom elements are being injected after the document body:
And inline styles are being walked after paint registration:
However, the custom paint does not seem to apply to the div; it just renders as a rectangle with a blue border, as though I had never applied the custom paint style:
I'm assuming there's something funky going on when it comes to writing the paint css rules to a stylesheet, but not entirely sure.
Browsers I've tested this locally on:
Minimal github repo where I can reproduce the issue:
https://github.com/simonsteer/remix-houdini-test
Thanks in advance to the contributors working on this awesome project! Very exciting stuff :)
The text was updated successfully, but these errors were encountered: