Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vue 2] Use Component Styles #214

Open
SupertigerDev opened this issue Aug 30, 2021 · 1 comment
Open

[Vue 2] Use Component Styles #214

SupertigerDev opened this issue Aug 30, 2021 · 1 comment
Labels
need help Don't know how to solve this issue yet

Comments

@SupertigerDev
Copy link

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 SupertigerDev changed the title Component styles [Vue 2] Use Component Styles Aug 30, 2021
@2A5F 2A5F added help wanted Extra attention is needed need help Don't know how to solve this issue yet and removed help wanted Extra attention is needed labels Aug 31, 2021
@rockstox
Copy link

For styling :

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need help Don't know how to solve this issue yet
Projects
None yet
Development

No branches or pull requests

3 participants