Closed asen23 closed 1 year ago
Hi @asen23, thanks for the feedback. If the color never changes accross the themes you can also define it outside of the plugin, like you would normally do with tailwind.
In other words you can use the plugin just for the colors that change and leave the other colors in the standard config
If the use case doesn't include color overriding, defining color in vanilla tailwind will work, but in my third example, if i want to override the color for certain theme, it won't work. I think the use case is kinda niche, but still nice to have in my opinion
Why not go for something like this?
const defaults = {
neutral: "#888"
}
createThemes({
light: {
...defaults,
primary: "white",
},
dark: {
...defaults,
primary: "black",
neutral: "#789"
},
})
To me it feels like it is easier to read and to reason about.
Ah you're right, i didn't really think about that. That works for me. Thanks for the quick reply
Is it possible to implement some sort of default color to this library?
If say i have a neutral color that is the same across all of my theme, i need to redeclare that color on each theme like so
If i only have 2 themes and only one same color it is no problem, but if there are many themes or many neutral color it will become harder to manage and easy to miss updating color. Maybe you can add default color like this
And if you need to override just define it on the color
Also cool library, definitely help making theming easier in tailwind. Thanks for your hard work!