Will there be a better way to define themes? #546
Replies: 1 comment
-
|
Yes - the current two-source setup is a real DX gap. Theme values should have one source of truth, and asking people to update both CSS variables and the TypeScript theme object is easy to get wrong. The cleanest path is probably making Code-first themes could also work, but CSS-to-TS generation feels like the better first step because it matches how shadcn themes are already shared today. The main things to define are token mapping, dark mode output, and how strict the generator should be when variables are missing. If my answer solved your problem, please mark it as answered the question — I'm here to help, and honestly I'm also collecting Galaxy Brain badges along the way 😆 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Would be great if this could support shadcn themes, and it has a horrible DX right now with having to update theme in two places. The whole point of a theme is to update it in only one place. If we could define our variables in code even, and have that translate into the typescript file. Even just a build script that could watch the css file and build it would be very useful.
Beta Was this translation helpful? Give feedback.
All reactions