wintercms / wn-tailwindui-plugin

Provides the TailwindUI-based modern backend skin for the Winter CMS backend
MIT License
15 stars 9 forks source link

Primary & secondary vars not available during compile time #4

Closed LukeTowers closed 2 years ago

LukeTowers commented 2 years ago

The color-mod function requires the --primary & --secondary CSS vars to be present during compile time which fails under the current configuration rendering any color-mod defined colours unavailable at the moment.

A couple of different options are available:

@joseph-sm @jaxwilko thoughts?

jaxwilko commented 2 years ago

We could modify the mix config generator to allow for custom vars to be passed into webpack, which should allow for those vars to be used at compile time. It may get a little bit messy though

LukeTowers commented 2 years ago

Yeah, still not a fan of that approach, especially when you factor in that the branding settings could be changed dynamically per request, especially in multi-tenant projects. You'd have to compile the assets once per tenant and switch between them, sounds like a nightmare.

LukeTowers commented 2 years ago

Fixed by https://github.com/wintercms/wn-tailwindui-plugin/commit/9604d918c5b280d73df15c1c0e5ffdb8f4134190