L-Blondy / tw-colors

Tailwind plugin to easily add multiple color themes to your projects.
MIT License
464 stars 14 forks source link

make it work with class "light" instead of "theme-light" #22

Closed hichemfantar closed 1 year ago

hichemfantar commented 1 year ago

Is it possible to make it work with the default tailwind light and dark classes? I currently use class="dark" and class="light"

L-Blondy commented 1 year ago

Well, I could make the className prefix a configurable option, however having the theme className equal to the theme name would also result in the creation of the variants light and dark that would conflit with the dark variant of tailwind.

Bear in mind that with tw-colors you probably don't need to use variants at all if the only thing that change between a theme and another are the colors.

Can you provide a code sample (html or jsx) that shows what you are trying to achieve? This way I'll get a better idea of your issue

L-Blondy commented 1 year ago

Exposed a new getThemeClassName option in the latest version that lets you customize the theme classNames

hichemfantar commented 1 year ago

Thanks for the update, I haven't noticed your previous reply. I'll test and report.