Runtime colors / theme properties #191
Answered
by
blvdmitry
its-monotype
asked this question in
Q&A
-
Is it possible to get theme color as a JS variable, for example, to apply it to a chart? |
Beta Was this translation helpful? Give feedback.
Answered by
blvdmitry
Oct 28, 2023
Replies: 1 comment 2 replies
-
Currently js definitions are not shipped to not double the theme size in the css/js bundles. However, you can still use css variables right in your js string: As an example, we use it this way on our website to style the Stripe payment form. Let me know if this works for your case |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
blvdmitry
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently js definitions are not shipped to not double the theme size in the css/js bundles.
However, you can still use css variables right in your js string:
"var(--rs-color-background-primary)"
As an example, we use it this way on our website to style the Stripe payment form. Let me know if this works for your case