shadow icon indicating copy to clipboard operation
shadow copied to clipboard

Experimental adoptedStyleSheets

Open 2A5F opened this issue 3 years ago • 0 comments

https://github.com/2A5F/shadow/issues/214#issuecomment-993566053

For styling :

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

61fc8ac

Experimental adoptedStyleSheets

const adoptedStyleSheets = new CSSStyleSheet()
adoptedStyleSheets.replace('p { color: green }')
<shadow-root :adopted-style-sheets="[adoptedStyleSheets]">
  <p>test adoptedStyleSheets</p>
</shadow-root>

result: p is green

2A5F avatar Jun 15 '22 15:06 2A5F