Replies: 4 comments 6 replies
-
Update: During a pair programming we found that the problem is related to the chakra css injection on the HTML root, so, regardless of provider level, the css injection is made on top of the application instead of the provider scope. The only workaround we found is to don't create theme tokens with same name. If anyone have a different solution, we appreciate it. |
Beta Was this translation helpful? Give feedback.
-
Thanks @primos63 for When it did not seem to work for generic variables such as A proof of concept for the same here: https://codesandbox.io/s/chakra-ui-theme-extension-forked-shjspw?file=/src/index.js |
Beta Was this translation helpful? Give feedback.
-
The only thing I haven't found a workaround for is Otherwise, the nested provider suggestion here works great. Thanks everyone here for your suggestions 👍 |
Beta Was this translation helpful? Give feedback.
-
It seems like the variable scope is now |
Beta Was this translation helpful? Give feedback.
-
Today I work in a project that provide two ChakraProvider components, one for the base theme of the application and other for custom themes created by the user, like the example bellow:
The main goal with that structure is to isolate user styles from the base theme styles. The problem is, with that structure the user styles are overwriting the base theme styles for some reason. I don't know if the provider with the user theme is overwriting the base theme provider state or something. Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions