If you want classes to change on a child element when something happens on the parent, you might be able to use Tailwind’s group class. src
Tag: tailwind
Categories
Custom Tailwind Utility Classes
If you need a one-off custom class that Tailwind doesn’t have built in, you can dynamically generate a Tailwind class to suit your needs. src
From src, but I haven’t tested…