Replies: 1 comment 10 replies
-
You could consider replacing the -const themes = 'var(--themes)'.split(',').map((theme) => theme.trim());
+const themes = [
+ 'apple',
+ 'space',
+ 'orange',
+ 'gray',
+ 'mid-gray',
+ 'soft-gray',
+ 'almost-white',
+ 'sky',
+ 'neo',
+]; |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have color palettes defined inside SCSS file, but I want them to be available to Tailwind, too. Colors are mapped fine by using variables, but getting and parsing theme names from SCSS to dynamically build theme colors doesn't work...
The console log:
[ 'var(--themes)' ]
Full code:
I know that like this, the CSS variable is not parsed, it is just a string, so I need a suggestion how to get it right.
Beta Was this translation helpful? Give feedback.
All reactions