shadow icon indicating copy to clipboard operation
shadow copied to clipboard

[Vue 2] Use Component Styles

Open SupertigerDev opened this issue 4 years ago • 1 comments

I don't know if theres an existing issue about this but is there anyway to use component styles?

<shadow-root>
   <CustomComponent /> // use styles that are inside the vue file
   <p>123</p>
</shadow-root>

SupertigerDev avatar Aug 30 '21 14:08 SupertigerDev

For styling :

mounted() { var shadow_css = new CSSStyleSheet; shadow_css.replaceSync(YOUR_CSS) this.$el.shadowRoot.adoptedStyleSheets = [ shadow_css ]; }

rockstox avatar Dec 14 '21 13:12 rockstox