This was only the case in Tailwind 1 and heavily discouraged by the documentation, except for development.
Tailwind requires a build step and shipping the 1.x development build was explicitly not meant for production.
Trying to use tw 1 like this without a build step, you can't even define a custom color scheme.
If this is what you want, I'd use a library that actually supports this. Maybe tachyons? But tbh, without the build step I'd consider using Tailwind at all a massive mistake. Then I'd prefer handwritten CSS.
Custom properties should make sth like this a lot more viable though. I'm sure there are libraries that better fit this use case, if you want to use a CSS library.