-
Notifications
You must be signed in to change notification settings - Fork 671
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
useRootStyles: false disables whole theme #2516
Comments
What framework are you using? |
Developing a chrome extension with react, I used patch-package to make it work correctly by changing this:
|
Okay, I get it. So this function is used only to affect the global style for It starts working again if you add a nested Thanks! Good catch. |
@pietrofxq #2519 should solve this. |
awesome thank you! |
Describe the bug
When using
useRootStyles: false
, the default theme is not returned and variables in components do not work. The issue is here:theme-ui/packages/color-modes/src/custom-properties.ts
Line 78 in 20a2e7e
I am not sure if we need to check
useRootStyles
at all here, the documentation says this property is only to avoid applying styles in the html, not that it would prevent the color mode from workingTo Reproduce
Steps to reproduce the behavior:
Expected behavior
useRootStyles: false
should not prevent variables from being definedThe text was updated successfully, but these errors were encountered: