How to set body background color in globalStyle with vars from theme? #649
-
Hi, I want to set the body's background color using
and then in my App component I set:
Unfortunately, it doesn't work. How can I achieve that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok. I found a way that works:
but maybe there is a better solution. Edit: |
Beta Was this translation helpful? Give feedback.
Ok. I found a way that works:
but maybe there is a better solution.
Some ideas?
Edit:
I found another solution with global styling and switching themes via hook: https://codesandbox.io/s/vanilla-extract-global-theme-rmz79?file=/src/vars.css.ts:1008-1049