Skip to content

Global Styles #2658

Answered by lmtr0
lmtr0 asked this question in Q&A
Mar 22, 2022 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

I have found that this makes the style work:

protected createRenderRoot(): Element | ShadowRoot {
    let root = this.attachShadow({mode: 'open'})
    let link = document.createElement('link');
    link.setAttribute('rel', 'stylesheet');
    link.setAttribute('href', 'theme.css');
    root.appendChild(link);
    return root;
}

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@cdelstad
Comment options

Answer selected by lmtr0
Comment options

You must be logged in to vote
2 replies
@buehler
Comment options

@lmtr0
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants