platforms
platforms copied to clipboard
How can I customize default colors for each tennant?
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".
I'd recommend using custom properties for this use case. This is the approach that has been taken for font customisation.
You can use CSS variables for this, or @crswll's tailwindcss-theme-swapper: https://twitter.com/joebell_/status/1677378425470996481