Update variable value #1046
Answered
by
askoufis
cojoclaudiu
asked this question in
Q&A
-
Hello, I have a question regarding with the CSS variables in Vanilla Extract. I've get this export const theme = createGlobalTheme(':root', {
colors: {
currentColor: 'red',
...
} I would like to update the How I can do that? |
Beta Was this translation helpful? Give feedback.
Answered by
askoufis
Mar 21, 2023
Replies: 1 comment 1 reply
-
Discussed this on discord, the option that made the most sense in this case was to use setElementVars(document.documentElement, {
[theme.colors.currentColor]: 'blue'
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cojoclaudiu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed this on discord, the option that made the most sense in this case was to use
setElementVars
on the document element, for example: