Best practice to use theme chart colors in ChartConfig #6014
mark-buhagiar
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As far as I was able to tell the docs does not cover this scenario, but maybe I misunderstood.
I have an array of chart colors defined in my css.
These are exposed in my
tailwind.config.ts
What? I would like to use the color from the tailwind config without directly referencing the CSS variable.
Why? If that variable ever gets renamed (for whatever reason) I only want to need to update my reference in the tailwind cofig itself.
I've managed to get this to work by doing the following:
However, I am wondering if there is a better way to set this up?
Beta Was this translation helpful? Give feedback.
All reactions