jaredh159 / tailwind-react-native-classnames

simple, expressive API for tailwindcss + react-native
2.08k stars 84 forks source link

prefixes in tailwind.config.js do not react to theme change #298

Open omedkane opened 6 months ago

omedkane commented 6 months ago

When I create a utility with addUtilities in tailwind.config.js something like :

addUtilities({
      'text-c-auto': 'text-black dark:text-white',
})

it works at the opening of the app, but when I change the theme it doesn't react

jaredh159 commented 5 months ago

hi there, sorry for the delay getting back to you on this, and thanks for opening the issue.

i haven't looked carefully at this yet, but i think this probably is either a bug or something we won't support, based on the way custom utilities are registered currently. i would like for this pattern to work, so next time i'm working on the codebase, i'll see if it's straightforward to make this work. or, you're welcome to tackle it in a PR if the use case is important to you.