-
Hey all. How can I declare local scoped variables like: css({
--myCustomVar: '#000',
px: '2px',
color: 'var(--myCustomVar)'
}) |
Beta Was this translation helpful? Give feedback.
Answered by
astahmer
Jun 30, 2023
Replies: 2 comments 1 reply
-
Hey, what you wrote almost works ! you just need to wrap the CSS var in quotes like you can see it in action here |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
anubra266
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, what you wrote almost works ! you just need to wrap the CSS var in quotes like
"--myCustomVar"
so that it remains valid JS syntaxyou can see it in action here