matyunya / smelte

UI framework with material components built with Svelte and Tailwind CSS
https://smeltejs.com/
MIT License
1.53k stars 114 forks source link

CSS Variables are not supported in the rollup config colors section #147

Open matt-psaltis opened 4 years ago

matt-psaltis commented 4 years ago

When configuring the color palette I'd like to be able to configure the palette using css variables so that I have easier runtime control. It looks like the color.js in the utils section attempts to convert the var function into a hex value which produces a #000 color instead. Would it be possible to have an exclusion for this during the buildPalette function?

smelte({
    tailwind: {
        colors: {
            primary: "var(--color-primary)"
        }
    }
})

A wonderful library well done!

csaltos commented 4 years ago

Please find a proposed solution at https://github.com/matyunya/smelte/pull/164