platforms icon indicating copy to clipboard operation
platforms copied to clipboard

How can I customize default colors for each tennant?

Open zmeyer44 opened this issue 2 years ago • 1 comments

I would like to be able to define a custom tailwind config color set for each tennant on the site. For example, site "books.web-store.com" could have a tailwind color config like { "primary":"#e5e7eb", "secondary":"#374151"}, while "wine.web-store.com" has a config like { "primary":"#111827", "secondary":"#9ca3af"}. That way in the classnames, I'm still always using something like "bg-primary".

zmeyer44 avatar Jul 09 '23 12:07 zmeyer44

I'd recommend using custom properties for this use case. This is the approach that has been taken for font customisation.

matthewlynch avatar Jul 09 '23 19:07 matthewlynch

You can use CSS variables for this, or @crswll's tailwindcss-theme-swapper: https://twitter.com/joebell_/status/1677378425470996481

steven-tey avatar Jul 10 '23 18:07 steven-tey