-
Notifications
You must be signed in to change notification settings - Fork 78
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
How to use global styles with this module #96
Comments
any update ? |
Hi @kkorada const sheet = new CSSStyleSheet();
sheet.addRule("*", `box-sizing: border-box`);
const styleSheets = [sheet];
export function Root() {
return (
<root.div styleSheets={styleSheets}>
<App />
</root.div>
);
} I don't know if it's the best way to handle it - if someone finds a more elegant way I will be happy to hear. Update:I notice that Firefox does not support the <root.div>
<style>
{
css`* {
box-sizing: border-box;
}`.styles
}
</style>
<InnerApp {...props} />
</root.div> Those styles are accessible for all the styles inside the root. |
Also, one could use a polyfill for |
Hi, In my app we are using styled components, fontawsome and some global styles. fontawsome and global styles are being attached to head. Is there any way I can attach them inside shadow root ?
For global css imports I tried configuring with style-loader insert option but it requires shadow root to be available before hand.
Can the styleSheets prop on root be helpful in this case ? How to use this prop ?
The text was updated successfully, but these errors were encountered: