L-Blondy / tw-colors

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

how can use two different class one for dark and on for light in one element #19

Closed MOAB7698 closed 1 year ago

MOAB7698 commented 1 year ago

hi! how can use two different class one for dark and on for light in one element for example <hr class="border-primary-700 theme-light:border-red-200" /> Because in some cases, in two different themes, the colors for one part may not be the same

L-Blondy commented 1 year ago

You can simply apply both the dark and light variants. Remember to also re-specify the current theme on the element

Here border-red-200 will be applied <hr class="theme-light theme-dark:border-primary-700 theme-light:border-red-200" />

Here border-primary-700 will be applied <hr class="theme-dark theme-dark:border-primary-700 theme-light:border-red-200" />

See the variants section of the docs for more details

https://github.com/L-Blondy/tw-colors#variants