Road to Constructable Stylesheet Objects
oceangravity opened this issue · 2 comments
oceangravity commented
Hice guys!
There's a plan to apply Constructable Stylesheet Objects (and polyfill) on future?
Maybe here:
vue-web-component-wrapper/src/index.js
Line 81 in e2b8456
Recently I've created a Vue component with this wrapper, but I implement the Stylesheet adoption on mounted()
this.$el.parentNode.shadowRoot.adoptedStyleSheets = [styleObject]
Thanks!
wbern commented
@oceangravity do you mean that you got it to work with the code snippet mentioned? The shadowroot is to my knowledge not yet available in the mounted hook, so I'm curious how your code would run.
lseguin1337 commented
Hi, here is a Vite plugin to use adoptedStyleSheets API with vue https://github.com/lseguin1337/vue-adopted-stylesheets
(PS: it's not directly compatible with this webcomponent wrapper library)